Vikas NV wrote:
Hi,
I have been trying to use the Impersonate user code that you have in
the PyWin32.chm document.
[... snip ...]
obj = Impersonate('another_user', '01928348')
obj.logon()
print win32api.GetUserName()
os.system('bash sleep.sh')
obj.logoff()
Unfortunately when you do os.system, Windows uses the
original user, not the impersonating user. By good
fortune, this issue came up just last week and someone
posted a ctypes implementation of CreateProcessWithLogonW:
http://mail.python.org/pipermail/python-win32/2009-June/009192.html
Hopefully you can take it from there...
TJG
_______________________________________________
python-win32 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-win32