This issue mainly targets permissions required for some operations:
For example, modify the registry, modify the Service Startup type, and so on. If no administrator permission is granted, these operations may report errors or be invalid. How to make yourProgramWhat if I run Windows 7 Vista as an administrator? You only need to modify the app. manifest. App. mainfest of the project property. By default, the app. manifest. App. mainfest does not exist. You can perform the following steps to generate and modify it:
1. Select your project, find properties, and click the properties page.
2. Select enable clickonce security settings.
Now, the app. manifest file is automatically generated in the properties directory. open the file and change the value of requestedexecutionlevel of the trustinfo/security/requestedprivileges node to requireadministrator. As follows:
<Requestedprivileges xmlns = "urn: Schemas-Microsoft-com: ASM. V3">
<Requestedexecutionlevel level ="Requireadministrator"UIAccess =" false"
/>
</Requestedprivileges>
3. Restart compilation.