Thanks! That is awesome! I just had to search and replace Structure
with ctypes.Structure and sizeof with ctypes.sizeof, save as logonw.py
and then was able to successfully test via
x =
logonw.CreateProcessWithLogonW(user,domain,password,0,'C:\\Python25\python.exe','C:\\Python25\python.exe
-i')
How about this?
import ctypes
NULL = 0
TRUE = 1
FALSE = 0
INVALID_HANDLE_VALUE = -1
WORD = ctypes.c_ushort
DWORD = ctypes.c_uint
LPSTR = ctypes.c_char_p
LPBYTE = LPSTR
HANDLE = DWORD
# typedef struct _PROCESS_INFORMATION {
# HANDLE hProcess;
# HANDLE hThread;
# DWORD dwProces
Emin.shopper Martinian.shopper wrote:
> On Mon, Jun 1, 2009 at 1:32 PM, Tim Roberts wrote:
>
>> Emin.shopper Martinian.shopper wrote:
>>
>>> Dear Experts,
>>>
>>> Can someone provide an example of how to use CreateProcessWithLogonW?
>>>
>> It's really just a combination of LogonUser
On Mon, Jun 1, 2009 at 1:32 PM, Tim Roberts wrote:
> Emin.shopper Martinian.shopper wrote:
>> Dear Experts,
>>
>> Can someone provide an example of how to use CreateProcessWithLogonW?
>>
>
> It's really just a combination of LogonUser and CreateProcess.
Right, the problem is that I don't see it i
Emin.shopper Martinian.shopper wrote:
> Dear Experts,
>
> Can someone provide an example of how to use CreateProcessWithLogonW?
>
It's really just a combination of LogonUser and CreateProcess. It uses
the first four parameters you passed to LogonUser, plus the parameters
you would have passed
Dear Experts,
Can someone provide an example of how to use CreateProcessWithLogonW?
I am having some issues with the subprocess module and how it
interacts with win32security.ImpersonateLoggedOnUser. Specifically, I
use the latter to change users but the new user does not seem to be
properly inhe