Questions tagged [createprocessasuser]
114 questions
1
vote
1 answer
CreateProcessAsUser Multiple Application Instances?
I'm attempting to launch a service using CreateProcessAsUser but for some reason multiple (30+) instances of the EXE are being created when debugging. The processes begin to spawn on this line of code:
ret = CreateProcessAsUser(DupedToken, Path,…

Blake
- 1,067
- 14
- 25
1
vote
1 answer
CreateProcessAsUser in user session (other than 0) from service (IIS 7)
My setting is:
Windows Server 2008, IIS 7
What I would like to accomplish:
IIS 7 receives a request from my website to do some 3D operations (in WPF) and in the end IIS 7 should render an image and store it somewhere on the disk to get loaded…

manton
- 541
- 1
- 6
- 26
0
votes
1 answer
CreateProcessAsUserW spawns NT AUTHORITY/SYSTEM shell and still shows output from the parent cmd.exe
I'm sure this is a likely a simple fix, but I've not been able to determine what the culprit is here. I don't want to spawn a new console (CREATE_NEW_CONSOLE), but rather use the existing parent thread/console.
Here's a snippet of the…
0
votes
1 answer
How to use CreateProcessWithTokenW in Java using JNA
We are using createProcessAsUser function to create a child process running in the context of logged in/Impersonated user using waffle and JNA libraries.
But we need to load the user profile after the impersonation, but the LoadUserProfile function…

Chandru
- 81
- 1
- 9
0
votes
0 answers
Intended Process is not created as impersonated/logged on user. Stack: Waffle, Spring security and JNA
When user tries to access the controller method from web application, the below code will be executed to create a process as impersonated/logged on user. Below code executed without any issues. New Notepad has been created but the process owner is…

Chandru
- 81
- 1
- 9
0
votes
0 answers
CreateProcessAsUser() is successful, but no process is created
I try to start a process using the CreateProcessAsUser() function. Everything goes well, I even get the id of the created process but the program does not start.
I have created process in suspended state, attach debugger to new created process and…

Thomas Balduz
- 11
- 3
0
votes
1 answer
Get session token as administrator without using password
I'm using LogonUser to get a HANDLE to the target session token and use it for the function CreateProcessAsUser.
status = LogonUserW(sessiondata->UserName.Buffer, sessiondata->LogonDomain.Buffer,NULL,LOGON32_LOGON_INTERACTIVE,…

zbx0310
- 64
- 8
0
votes
0 answers
C# How to switch a process running in system context to user context without asking user credential
I am running a process to read network drive (e.g U:) but the process is running in system context and network drive is only accessible in user context. Now I want that process to switch to user context (currently logged in user) and read U drive…
0
votes
2 answers
C++ LPTSTR problem calling CreateProcessAsUser with getenv
I am trying to call function CreateProcessAsUser. Passing constant string is fine. Trying to pick up an Environment variable using char* getenv(const char name) is causing me a problem.
If I use the following, notepad.exe will…

fred
- 18
- 4
0
votes
0 answers
Assigning JobObject to process with non-zero session id launched from a SYSTEM service
I have a Windows SYSTEM service which needs to launch a new process in the context of the logged-in user. Along with this, I need to create a Job for the new process with certain limits.
I am extracting the process token of explorer.exe and…

dev
- 1
0
votes
0 answers
Powershell script shows that $env:username is local system even if the script is executed by a process that is running under user account
I have a windows service that runs and manages multiple processes.
All the processes are running under the user account as per the task manager details tab. So one of the processes is executing a PowerShell script to do some operation that requires…
0
votes
2 answers
CreateProcessAsUser too fast to track process
We call CreateProcessAsUser() and, after having checked the result, we start tracking (WMI) the process that might create other processes.
In 1 case, the first process is so fast that it creates another process and terminates before we can start…

marco
- 1,686
- 1
- 25
- 33
0
votes
1 answer
CreateProcessAsUser return success but process exit with error 3228369022
I have 3 applications running:
Application A:
Local server running as a background service under Local System with permission to interact with the desktop ( Atleast that is what Advanced Installer says )
Application B:
A desktop capture…

Sylvain Martens
- 53
- 5
0
votes
0 answers
C++ Windows - CreateProcessAsUser() fails but with no error if manifest requires administrator rights
I have a simple program, just an empty GUI, that is launched from a SYSTEM service (mine) in the following way:
DWORD creationFlags = CREATE_NEW_PROCESS_GROUP | CREATE_UNICODE_ENVIRONMENT | DETACHED_PROCESS | EXTENDED_STARTUPINFO_PRESENT;
…

marco
- 1,686
- 1
- 25
- 33
0
votes
1 answer
Problem with parameters in CreateProcessAsUser
I've been assigned to build a windows service that is capable of launching a proccess into the current interactive user, using VB.NET 2005.
After some research, i've built the following code:
Dim hToken As IntPtr = IntPtr.Zero
Dim LastW32Error As…

Robson Rocha de Araujo
- 641
- 1
- 12
- 24