Tuesday, January 31, 2012

Elevate the process to run with admin mode

http://msdn.microsoft.com/en-us/library/bb756929.aspx




Create an name.exe.manifest







level="requireAdministrator"

uiAccess="false"/>







VS Command prompt : mt.exe -manifest menu.exe.manifest -outputresource:menu.exe;#1



Post build event:

"$(DevEnvDir)\..\Tools\Bin\mt.exe" -manifest "$(ProjectDir)$(TargetName).exe.manifest" -outputresource:"$(TargetDir)$(TargetName).exe;#1"



For VS2010,

Project Properties > Configuration Properties > Linker > Manifest File

Change the 'UAC Execution Level' to the desired value.



Pasted from



No comments:

Post a Comment