Questions tagged [createprocessasuser]
114 questions
2
votes
0 answers
Impersonating user in remote machine and creating a process as logged in user
We are developing Java web application, it will be deployed and used in the pure Windows platform. Our use case is, couple of licensed Tools/Software in Server needs to be accessed by the associates who has license to those tools.
Our plan is to use…

Chandru
- 81
- 1
- 9
2
votes
0 answers
How to use LogonUser CreateProcessAsUser when only a PIN is defined?
In our application we manage a user database in which we have the option to log in to our app by verifying username and password with the local installation. By now we actually used LogonUser for that purpose.
So... Now with Windows 11 the default…

mrabat
- 802
- 7
- 15
2
votes
1 answer
How in windows create process as user using python?
I try to create python script to start process as user (In future this code will be run from session 0 by windows service). For this i decide to use win32api.
But I have an error:
win32process.CreateProcessAsUser(token, None,…

Evgeny
- 23
- 4
2
votes
1 answer
user without password can be impersonated only if they are in admin group
The goal is to have a service create a process which has the security context of a user whose password is not known.
I understand and accept the limitation that the new process will only be able to access local resources
I think I am close to a…

user2849221
- 113
- 8
2
votes
2 answers
CreateProcessAsUser error code 6
I am using LogonUser to get primary user token and then CreateProcessAsUser APIs to create process. But I am getting error code 6. Not sure what the problem is. Below is the code.
using System;
using System.Collections.Generic;
using…

uttam.aaseri
- 55
- 6
2
votes
0 answers
The process owner cannot kill the process which created by CreateProcessAsUser API
I have a windows service which started with local System account. In this service, it use CreateProcessAsUser API to create a new process with user1 account . After the process is created:
Logon the system as Administrator, I can find the owner of…

kongxx
- 103
- 1
- 7
2
votes
1 answer
CreateProcessAsUser works, CreateProcessWithTokenW does not
We have a service that runs as LocalSystem. We use CreateProcessAsUser and LoadUserProfile to start a working app as a specific user. Works just great. But if we try to use CreateProcessWithTokenW to avoid explicitly loading and managing user…

Alex I
- 2,078
- 3
- 18
- 24
2
votes
0 answers
Use of lpEnvironment in CreateProcessAsUser
I need to understand the use of lpEnvironment in CreateProcessAsUser.
I have these two lines of code in my solution which in invoked by a windows service running as Local System.
CreateProcessAsUser(hTokenCpy, null, applicationName, ref saProcess,…

Ranjeeth
- 91
- 1
- 9
2
votes
2 answers
CreateProcessAsUser() in C# .NET Framework API (NOT Win32 API)
When I use Win32 API CreateProcessAsUser() to execute a program with impersonated user in my C# .NET project, it was successful.
But I want implement that using .NET Framework API.
There is a similar method like…

llawlight
- 21
- 2
2
votes
0 answers
CreateProcessAsUser from Local System Admin does not apply Windows style
i have a problem in an application using Windows API CreateProcessAsUser from local system admin in order to run an application as a different user. Everything works fine so far, but the Windows window and frame style are not applied somehow. The…

caschulz88
- 91
- 1
- 4
2
votes
0 answers
Why is CreateProcessAsUser failing with "cannot create a file when that file already exists"?
I'm trying to create a client process in a user session from a service, by using CreateProcessAsUser. But when I debug it with VS 2010, CreateProcessAsUser fails and error code is 0, error message is
cannot create a file when that file already…

Jerry
- 1,704
- 5
- 20
- 40
2
votes
1 answer
CreateProcessAsUser doesn't draw the GUI
I have a windows service running under "SYSTEM" account that checks if a specific application is running for each logged in user. If the application is not running, the service starts it (under corresponding user name).
I'm trying to accomplish my…

paschka76
- 95
- 2
- 10
2
votes
1 answer
Creating a process in a non-zero session from a service in windows-2008-server?
I was wondering if there is a simple way for a service to create a process in user session?
My service is running as a user(administrator) account and not as a LocalSystem acount, therefore i can't use the WTSQueryUserToken function.
i have tried…

Itay Levin
- 1,579
- 2
- 16
- 23
2
votes
2 answers
CreateProcessAsUser user context
I've already been searching long time but couldn't find a working solution yet :-(
I have created a window service that launches a client on every user logged on to a machine using CreateProcessAsUser…

Vibrationz
- 31
- 1
- 2
2
votes
1 answer
Launching an administrative interactive process when a standard user is logged on
I have a system service which creates a helper interactive process as administrator so that it can access some desktop-related resources, including the BlockInput() function and NVIDIA's NVAPI functions, which cannot be run from a service. When the…

Display Name
- 2,323
- 1
- 26
- 45