I want my application not to need an Admin to use it.
I should be usable for a normal user.
When a user wants to change some settings of the app I need Admin Rights.
So I want to launch a second instance of the application which requires Admin Rights. (with user agreement request and so on)
Is there any way to accomplish that?
I tried:
Process p = new Process();
p.StartInfo.WindowStyle = ProcessWindowStyle.Normal;
p.StartInfo.FileName = Application.ExecutablePath;
p.StartInfo.UseShellExecute = false;
p.StartInfo.RedirectStandardOutput = true;
p.StartInfo.RedirectStandardError = true;
if (System.Environment.OSVersion.Version.Major >= 6)
{
p.StartInfo.Verb = "runas";
}
p.Start();
But it seems not to work.