You need to create a manifest file with the below setting and specify it under the
Project Properties->Configuration Properties->Manifest Tool->Input and Ouput->Additional Manifest Files
In Windows Vista, the correct way to mark your applications is to embed an application manifest within your program that tells the operating system what the application needs. In the Windows Vista release, there are provisions to allow non-manifested or unsigned code to run with administrative privileges. In future releases, the ONLY way to run an application elevated will be to have a signed manifest that identifies the privilege level the application needs.
Application manifests are not new to the Windows Vista release. Manifests were used in Windows XP to help application developers identify such things as which versions of DLLs the application was tested with. Providing the execution level is an extension to that existing manifest schema.
The Windows Vista application manifest has been enhanced with attributes that permit developers to mark their applications with a requested execution level. The following is the format for this.
<requestedExecutionLevel level="asInvoker|highestAvailable|requireAdministrator" uiAccess="true|false"/>
level
Important note For Windows Vista Beta-1, the term used for this level is leastPrivilege. Developers wishing to mark their code for this level on Windows Vista Beta-1 should use leastPrivilege. Developers will need to update their manifest to use the term asInvoker in subsequent versions of Windows.
uiAccess