Process.Start () does not create a new process under the same user

It always seemed to me that when you start the process (domain\user) mydomain\myuserwhen using Process.Start()it, it will start this new process using the same credentials - mydomain\myuser.

The problem I am facing is that my call Process.Start()seems to create a process under the SYSTEM account, which causes me rights issues in the running process (which should start under the administrator account due to the work that it does ) If it changes things - I create this process (user exe exe) from within the Windows installer .

Any suggestions? I read about Windows Group Policies (possibly) affecting this, but to be honest, it lost me.

EDIT: small snippet:

Where exenameand commandLineare the parameters for the method body:

ProcessStartInfo procInfo = new ProcessStartInfo(exeName, commandLine);
procInfo.WorkingDirectory = workingDirectory;
procInfo.UseShellExecute = false;
procInfo.CreateNoWindow = true;
Process process = Process.Start(procInfo);
Process.WaitForExit();
return process.ExitCode;
+1
source share
2 answers

Either set procInfo.UseShellExecute to true, or execute cmd as a process with your exe as the cmd command parameter. If the UseShellExecute parameter is set to false, there are many interesting side effects: UseShellExecute

+3
source

. Process.Start() - ProcessStartInfo , .

- .

UPDATE

OK! . MSI , Windows), , SYSTEM.

+2

All Articles