April 24, 2024

SamTech 365

PowerPlatform, Power Apps, Power Automate, PVA, SharePoint, C#, .Net, SQL, Azure News, Tips ….etc

Run a process as Administrator with C# programmatically

If you need to run external program from C# code with Administrator privileges,  this code might help.

ProcessStartInfo info = new ProcessStartInfo("Process.exe");
info.UseShellExecute = true;
info.Verb = "runas";
Process.Start(info);
3

If you need to run external program from C# code with Administrator privileges,  this code might help.

ProcessStartInfo info = new ProcessStartInfo("Process.exe");
info.UseShellExecute = true;
info.Verb = "runas";
Process.Start(info);
3