CreateProcessAsUser
CreateProcessAsUser copied to clipboard
Creates a process in a different Windows session
I keep getting: `Exception calling "StartProcessAsCurrentUser" with "1" argument(s): "Arithmetic operation resulted in an overflow."` running this: `[murrayju.ProcessExtensions.ProcessExtensions]::StartProcessAsCurrentUser("C:\Windows\System32\WindowsPowershell\v1.0\Powershell.exe") `
Hi, It it possible to add redirection of the output and the error stream? Thanks
I'm sure I'm not doing something correct, here is what I've done. I downloaded the file CreateProcessAsUser-master.zip and opened it in VS2015. I tried running it unmodified and received the...
Nothing happened after I adjusted the `wShowWindow` property to `SW_MINIMIZE`, and I found something description of `wShowWindow` property in MSDN: If `dwFlags` specifies `STARTF_USESHOWWINDOW`, this member can be any of...
Hi, I got the sample working fine under a service, but not when running as a normal app. So I understand there's a few more tokens as described here https://devblogs.microsoft.com/oldnewthing/20190531-00/?p=102532...
I modified DemoService to run `ProcessExtensions.StartProcessAsCurrentUser("cmd.exe", "/d /s /c \"node Path\\To\\file\"")`, I have installed it and it works perfect, So I made an executable to receive the route to execute...
I've been using this code and the fact that it always throws an instance of the base Exception class makes it rather annoying to handle. A better solution would be...
I am running a program in SYSTEM user context and want to user StartProcessAsCurrentUser to initiate a new instance of the same program but in logged-in user context. When I...
Hi There, I was wondering how is it possible to wait the process that has been started to exit and return the exit code, instead of process ID?
Clarify that you need to be a Service running under the LocalSystem account. I have a service running under a domain account (because it needs to access domain resources) and...