[Barnaby Scott]

| So I'm thinking along these lines:
| 
| import subprocess
| sp = subprocess.Popen(r'C:\WINNT\SYSTEM32\runas.exe 
| /user:administrator
| C:\Program Files\Microsoft Games\Age of Mythology\aom.exe')
| #some sort of code to send the password here...
| #help!

I *think* -- and I'm happy to be wrong -- that there's
no way you're going to get that password in there. One
place to start looking might be:

pywinauto - http://pywinauto.pbwiki.com/

which lets you automate Windows in general; don't know
how much use it'll be here. 

Alternatively, look into the pywin32 package, and in 
particular at the win32security functions which let you 
impersonate another user. They're not trivial to use, 
but their use has been explained a few times over the 
years I think. Mostly by Roger Upole who wrote most if 
not all of the Python bindings.

Here's a post which looks useful; you'll have to hunt
around for others:

http://groups.google.com/group/comp.lang.python/msg/6bbefb9d4d45d253

I suggest you ask this question again on the main
python / python-win32 lists; it's a bit too platform-specific
for the tutor list, I would say.

TJG

________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________
_______________________________________________
Tutor maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/tutor

Reply via email to