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

[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

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: [...]

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

2019-03-18 Thread kurt
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". (for what I mean, see: https://superuser.com/questions/456399/what-different-types-of-shortcut-are-there/639967#639967) The code below works