I am attempting to start a hidden console application, but require the application to have elevated privileges.
I have successfully managed to have the UAC prompt appear, however can't get it to appear when I try to start the process hidden.
ProcessStartInfo proc = new ProcessStartInfo();
proc.UseShellExecute = false;
proc.FileName = "C:/example.exe";
proc.CreateNoWindow = true;
proc.Verb = "runas";
This will result in a process starting in the background, except without a prompt appearing (and without elevated priveleges). If I change UseShellExecute to true, then the UAC prompt appears, however the console window is visible too.