Use the manifest file in the Vista operating system to grant administrator permissions to the VC application.

Source: Internet
Author: User
Applications compiled by VC Program Running in Vista may fail due to permission issues.

Use the following method to add a manifest file to the application. When the program is running, the system will jump out of the UAC dialog box and get the management permission.

1. Open the application'sSource codeEngineering

2. Add a "Custom" resource, enter "Resource Type" in 24, change the resource ID to 1, and then copy the following content to the resource content to save

<? XML version = "1.0" encoding = "UTF-8" standalone = "yes"?>
<Assembly xmlns = "urn: Schemas-Microsoft-com: ASM. V1" manifestversion = "1.0">
<Assemblyidentity
Version = "1.0.0.0"
Processorarchitecture = "x86"
Name = "mulitray.exe. manifest"
Type = "Win32"
/>
<Trustinfo xmlns = "urn: Schemas-Microsoft-com: ASM. V3">
<Security>
<Requestedprivileges>
<Requestedexecutionlevel level = "requireadministrator" UIAccess = "false"/>
</Requestedprivileges>
</Security>
</Trustinfo>
</Assembly>

3. Re-compile the application, and then you will find that the icon of the widely used program will have a small shield icon under Vista.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.