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 to CreateProcess. You can look at the source code to subprocess to see how they call CreateProcess. In fact, perhaps you could use that as a base, passing in your login credentials as an additional parameter. Processes created by CreateProcessAsUser don't have access to the desktop, by default. Do you need UI? If so, you'll need to read http://msdn.microsoft.com/en-us/library/aa379308.aspx > Any advice on either spawning subprocesses which inherit parent user > properly or changing users in a better way on Windows would be greatly > appreciated. > Unfortunately, this is a maze of twisty passages, all alike. It is a complicated and not well known part of the Windows API, and you will end up doing a lot of very frustrating experimentation. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. _______________________________________________ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32