Bat exe convert administrator manifest

broken image

Proc.WorkingDirectory = Norton\Desktop\' ProcessStartInfo proc = new ProcessStartInfo() If you don't want your application to run in elevated mode, then you have to create a dedicated exe that will run on elevated mode and that calls the batch file : your application will then just call this external process to perform the operations implemented in the batch file. The following MSDN link talks about the manifest syntax : There are many articles on the web explaining UAC and how programs interact with it using manifest files. The solution to the original question is that the application that is calling the batch file must run in an elevated mode by including a manifest file that contain requestedExecutionLevel set to requireAdministrator. I hope the aboe code-snippet was helpful.įirst, the previous code-snippet will not work because the problem is NOT how to run a batch file (the person who asked the question is already calling the batch file programmatically) but it's an authorization issue due to UAC under Vista. ProcInfo.WorkingDirectory = //The working DIR. ProcInfo.FileName = //The file in that DIR. ProcessStartInfo procInfo = new ProcessStartInfo()

broken image