Albert
Albert

Reputation: 31

c# run process on non-admin right

I started a process on admin rights:

psi.Verb = "runas";
process.StartInfo = psi;
process.Start();

But now this process have to start another application but on non admin rights. Application works on non-admin rights. How I can do this?

Upvotes: 3

Views: 1123

Answers (1)

jgauffin
jgauffin

Reputation: 101192

You need to use CreateProcessAsUser from the WinAPI.

Try to use WindowsIdentity.GetCurrent().Token to get the token to create the process with.

Upvotes: 2

Related Questions