I have a scenario where I need to launch an EXE from my .NET application, but I can't get around the UAC prompt that pops up. The prompt is triggered even before the other EXE is launched - probably on the very call to Process.Start
.
I use this code for launching the app:
var info = new ProcessStartInfo(path, "params");
info.Verb = "runas";
try
{
Process.Start(info);
}
catch (System.ComponentModel.Win32Exception)
{
// Person denied UAC escallation
return false;
}
Both EXEs (my app and the other EXE) have this defined in their manifest:
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
How can I execute the other EXE without triggering a UAC prompt, and have it have the same access token as the calling application (so it can make changes to files in the app folder etc)?