Re: [python-win32] runas analog

2019-03-18 Thread Vernon D. Cole
Perhaps ShellExecuteEx will do what you are wishing for? I found a good formula for starting a process as an administrator and it is packaged in a small module tries to emulate a "sudo" command. You might look at the cod

[python-win32] runas analog

2019-03-18 Thread Kuree Kafir
Hello, I am trying to implement something similar to the runas /netonly command in python. handle = win32security.LogonUser(userName, domain, password, win32con.LOGON32_LOGON_NEW_CREDENTIALS, win32con.LOGON32_PROVIDER_DEFAULT) win32security.ImpersonateLoggedOnUser(handle) These two commands succ

Re: [python-win32] How to get target of folder shortcuts

2019-03-18 Thread Tim Roberts
kurt wrote: Hello, I'm trying to get the target filename of windows shortcuts. The code below works great for regular shortcuts, but errors out on "folder shortcuts". ... The code below works great for regular .lnk shortcuts, but folder shortcuts give me: [...] persistFile.Load(fnam