Following problem: I want to start the cmd as administrator in C# with a process to get the UAC befor the code:
var process = new Process();
var ps= new ProcessStartInfo();
ps.CreateNoWindow = true;
ps.FileName = @"cmd.exe";
ps.Verb = "runas";
process.Start();
After i confirm the UAC, i want to run code. After the code i want to start the same process but this time with arguments and without the UAC. Is that possible? Target is that i get a exe with the running code. I need the exe to run the arguments in the cmd. But the UAC should pop up before the exe will be appear. (the code should run after the uac, and the arguments after code). PS: I need the administrator priviliges to run the arguments.