Possible Duplicate:
Request UAC elevation from within a Python script?
I’d like to execute a series of Java processes from a Python script, but I must run the Java with elevated UAC privleges (as Administrator) in order to get the results I’m expecting. My call right now is basically:
from subprocess import Popen
callme = 'java weka.doStuff' # Want this to run as Administrator
Popen(callme)
How do I force this process to run as administrator or with some sufficiently high of elevated UAC privileges?
I’m afraid that you cannot use Popen for that.
One option would be using
win32api.ShellExecuteand settingrunasargument to Administrator.Another option would be using JPython itself…