Did I find the right examples for you? yes no

All Samples(12)  |  Call(10)  |  Derive(0)  |  Import(2)

src/n/w/nwsclient-1.6.3/scripts/PySleighService.py   nwsclient(Download)
            if _isPrivileged(self.user):
                procHandle, threadHandle, procId, threadId = win32process.CreateProcessAsUser(
                        self._userHandles[user], self.applicationName, commandLine,
                        processSecurityAttributes, threadSecurityAttributes,
                        fInheritHandles, creationFlags,

src/v/i/VistA-HEAD/Python/Pexpect/winpexpect.py   VistA(Download)
                      CloseHandle, GetCurrentThread, STD_INPUT_HANDLE)
from win32pipe import CreateNamedPipe, ConnectNamedPipe
from win32process import (STARTUPINFO, CreateProcess, CreateProcessAsUser,
			  GetExitCodeProcess, TerminateProcess, ExitProcess,
                          GetWindowThreadProcessId)
            token = LogonUser(self.username, self.domain, self.password,
                              LOGON32_LOGON_INTERACTIVE, LOGON32_PROVIDER_DEFAULT)
            res = CreateProcessAsUser(token, python, pyargs, None, None,
                                      False, CREATE_NEW_CONSOLE, self.env,
                                      self.cwd, startupinfo)

src/w/i/winpexpect-1.5/lib/winpexpect.py   winpexpect(Download)
                      CloseHandle, GetCurrentThread)
from win32pipe import CreateNamedPipe, ConnectNamedPipe
from win32process import (STARTUPINFO, CreateProcess, CreateProcessAsUser,
			  GetExitCodeProcess, TerminateProcess, ExitProcess)
from win32event import WaitForSingleObject, INFINITE
            token = LogonUser(self.username, self.domain, self.password,
                              LOGON32_LOGON_INTERACTIVE, LOGON32_PROVIDER_DEFAULT)
            res = CreateProcessAsUser(token, python, pyargs, None, None,
                                      False, CREATE_NEW_CONSOLE, self.env,
                                      self.cwd, startupinfo)

src/m/a/main-HEAD/External.LCA_RESTRICTED/Languages/IronPython/27/Lib/site-packages/win32/Demos/winprocess.py   main(Download)
            hUser = logonUser(login)
            win32security.ImpersonateLoggedOnUser(hUser)
            procHandles = win32process.CreateProcessAsUser(hUser, *procArgs)
            win32security.RevertToSelf()
        else:

src/t/r/TrustRouter-HEAD/client/packaging/Windows/Python32/Lib/site-packages/win32/Demos/winprocess.py   TrustRouter(Download)
            hUser = logonUser(login)
            win32security.ImpersonateLoggedOnUser(hUser)
            procHandles = win32process.CreateProcessAsUser(hUser, *procArgs)
            win32security.RevertToSelf()
        else:

src/e/i/einstein-HEAD/Python25Einstein/Lib/site-packages/win32/Demos/winprocess.py   einstein(Download)
            hUser = logonUser(login)
            win32security.ImpersonateLoggedOnUser(hUser)
            procHandles = win32process.CreateProcessAsUser(hUser, *procArgs)
            win32security.RevertToSelf()
        else:

src/s/u/SublimeSpeech-HEAD/lib/pywin64bit/win32/Demos/winprocess.py   SublimeSpeech(Download)
            hUser = logonUser(login)
            win32security.ImpersonateLoggedOnUser(hUser)
            procHandles = win32process.CreateProcessAsUser(hUser, *procArgs)
            win32security.RevertToSelf()
        else:

src/s/u/SublimeSpeech-HEAD/lib/pywin32bit/win32/Demos/winprocess.py   SublimeSpeech(Download)
            hUser = logonUser(login)
            win32security.ImpersonateLoggedOnUser(hUser)
            procHandles = win32process.CreateProcessAsUser(hUser, *procArgs)
            win32security.RevertToSelf()
        else:

src/s/u/superpy-1.2.6/superpy/utils/winprocess.py   superpy(Download)
            hUser = logonUser(login)
            win32security.ImpersonateLoggedOnUser(hUser)
            procHandles = win32process.CreateProcessAsUser(hUser, *procArgs)
            win32security.RevertToSelf()
        else:

src/i/m/imagefactory-HEAD/windows-proxy-code/consumer-service.py   imagefactory(Download)
                # this way the process will impersonate a user
                try:
                    hProcess, hThread, PId, TId =  win32process.CreateProcessAsUser(token, *procArgs)
 
                    hThread.Close()