I have a visual studio installation and deployment project. I added a .cmd script to it. The script will require administrator rights. When a user clicks on setup.exe, UAC asks the user for administrator permission. Therefore, I assumed that all processes created and called in the setup.exe file will be launched as an administrator. Therefore, I made an installation call with a console application that contains the following code.
ProcessStartInfo p1 = new ProcessStartInfo(); p1.UseShellExecute = true; p1.Verb = "runas"; p1.FileName = "cmd.exe"; Process.Start(p1);
Therefore, it had to work when it was launched under administrative space.
I want to run cmd.exe through the C # process class as an administrator. I am running Windows Vista.
I tried it doesn’t work! What can I do!
c # cmd process windows-vista administrator
Anirudh goel
source share