Questions tagged [createprocessasuser]
114 questions
2
votes
0 answers
Pipe stdin/stdout/stderr completely to Process created with CreateProcessAsUser
What i'm trying to do is writing a little wrapper, that allows me to start an application on the Windows GUI of the currently locked in User from withing a service. The wrapper is called as following: "wrapper.exe mspaint arg1 arg2 <…

andred
- 1,204
- 1
- 17
- 29
2
votes
2 answers
How to get Windows SYSTEM user token
Operating system is Windows 7 or higher with UAC enabled. Calling process has admin rights, already confirmed by the UAC box.
I want to spawn a new Console window (cmd.exe) under user SYSTEM (don't ask why). I can do this interactively by using…

e4ch
- 31
- 1
- 5
1
vote
0 answers
Want to launch process 'X' as using token of user 'B' in session of user ‘A’ by AdvApi in service code
We have service which is running as system session.
Taking token of User 'B'
In this token changing session id of User 'A'
Using this token launching the process 'X'
After process 'X' launch getting error The exception unknown software exception…

Mukesh Methaniya
- 752
- 1
- 5
- 13
1
vote
0 answers
Golang calls windows.CreateProcessAsUser function how to get Stdout content
Golang calls windows.CreateProcessAsUser function how to get Stdout content:
func CreateProcessAsUser(token Token, appName *uint16, commandLine *uint16, procSecurity *SecurityAttributes, threadSecurity *SecurityAttributes, inheritHandles bool,…

Tiki
- 33
- 4
1
vote
1 answer
CreateProcessAsUser is not working in Incognito/private window
Creating a new process from Java web application using createProcessAsUser and waffle SSO impersonation. Everything works fine in chrome and any other browsers normal window, when I try to access the web application using incognito/private window,…

Chandru
- 81
- 1
- 9
1
vote
0 answers
CreateProcessAsUser using user token in session 0?
Somewhat unconventional question, but I want to know if it is possible/am trying to create a process in session 0 using a user's token duplicated from their logon session. There are ample examples of having a service/localSystem create a process in…

Octoberfest7
- 55
- 5
1
vote
1 answer
What is hToken (com.sun.jna.platform.win32.WinNT.HANDLE) in CreateProcessAsUser method. How to retrieve it using windowsIdentity Object
[Reference]
[1]: Create process as different user with Java and Kerberos
As mentioned in the code, we need to pass hToken in the below snippets:
Advapi32.INSTANCE.ImpersonateLoggedOnUser(/* provide the security context token */)
In the below code…

Chandru
- 81
- 1
- 9
1
vote
1 answer
Little help with a windows service
(c#, .net framework 2.0 desired)
Hello.
This is a pratical and technical question... you have been warned. :)
I have a windows service, which requires each user to provide a login to an online service. Lets imagine we have two users a and b.
a…

philbird
- 789
- 1
- 8
- 15
1
vote
1 answer
Setting up ProcessStartInfo for C# process from CreateProcessAsUser with CREATE_SUSPENDED flag and JobObject
In my C# program, I need to (1) create a process in a suspended state and (2) modify the token. I am doing this so that I can register it to a JobObject so that if the parent process dies unexpectedly while the child is still running, the child is…

S.J.
- 11
- 2
1
vote
1 answer
Windows C# Is there a way to create a new process with the Kerberos ticket of parent process?
I'm able to create a new process via CreateProcessAsUser from code I found here:
https://odetocode.com/blogs/scott/archive/2004/10/28/createprocessasuser.aspx
It works fine, but the new process does not contain the Kerberos ticket of the new user…

jangooni
- 167
- 3
- 11
1
vote
1 answer
Launching an interactive user-process from a local-system process - get Error Code 5
I use Java JNA to execute Windows API commands.
I have a background service running as local-system.
From this background service, I'd like to spawn a new process, e.g. notepad.exe on the currently active desktop and user. The new process should…

TRec
- 21
- 4
1
vote
1 answer
Open UWP application from service
I am trying to Launch applications and processes using CreateProcessAsUser from a service I created. My attempts to open applications such as notepad, IE, etc. were successful. But I hit a roadblock when trying to open Groove Music, which is an UWP…

Bharath Suresh
- 483
- 2
- 18
1
vote
0 answers
In Windows 7, a process started with CreateProcessAsUser by a windows service with a local system account crashes
In Windows 7, a process started with CreateProcessAsUser by a windows service with a local system account crashes, but the same process started manually runs fine. The CreateProcessAsUser functionality is in a separate COM component [64 bit C++…

Sagar Kapadia
- 105
- 1
- 9
1
vote
3 answers
CreateProcessAsUser not setting the user correctly
Calling a GUI app using
[DllImport(
"advapi32.dll",
EntryPoint = "CreateProcessAsUser",
SetLastError = true,
CharSet = CharSet.Ansi,
CallingConvention = CallingConvention.StdCall)]
private static extern bool CreateProcessAsUser(
…

Jader Dias
- 88,211
- 155
- 421
- 625
1
vote
1 answer
How to create process as user with arguments
Tried to create a process as a user with portablechrome.exe but I could not handle it with arguments.
How can I open an HTML file with arguments?
Such as portablechrome.exe sample.html --kiosk
I'm using system service like this:
string url =…

Marijke Buurlage
- 331
- 5
- 21