I have a C # executable that I want to run on Windows 7 without a dialog asking me to run as an administrator. So, here is my code inside the program that runs the C # executable called testApp.exe.
Process testApp = new Process();
testApp.StartInfo.FileName = "C:\\Program Files\\Common Files\\testApp.exe";
testApp.Start();
I also create minfest for both programs. app.manifest for testApp.exe and app.manifest for the program that launches testApp.exe, and then I change the following line in both manifests:
requestExecutionLevel level = "requireAdministrator" uiAccess = "false"
When I double-click testApp.exe to run it, the testApp.exe program crashes, but when I run it as an administrator, it works fine, without crashing. Therefore, this behavior also occurs when you start the program that starts testApp.exe, and it fails when working with testApp.exe.
I have to do something wrong. I need to change the manifest name because I use the default names created by Visual Studio 2010.
thank.
source
share