2

I am trying to open google.com with Internet Explorer. This is my program:

import subprocess

arg = ['runas', '/user:Administrator',
        "C:\Program Files (x86)\Internet Explorer\iexplore.exe", "www.google.com"]
subprocess.call(arg)

I saved this file as shortform.py and executed it. The program worked but it doesn't show any output. How can I do this?

1 Answer 1

1

Use this:

import subprocess

arg = ['runas', '/user:Administrator', "C:\Program Files (x86)\Internet Explorer\iexplore.exe www.google.com"]
subprocess.call(arg)
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.