Reputation: 21
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?
Upvotes: 2
Views: 1194
Reputation: 897
Use this:
import subprocess
arg = ['runas', '/user:Administrator', "C:\Program Files (x86)\Internet Explorer\iexplore.exe www.google.com"]
subprocess.call(arg)
Upvotes: 1