Monday, 30 April 2012

How to turn off VirtualStore in C++ manifest file fix asInvoker


create file.exe.manifest:   with below contents:-


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
  <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
    <security>
      <requestedPrivileges>
        <requestedExecutionLevel
          level="asInvoker"
          uiAccess="false"/>
        </requestedPrivileges>
       </security>
  </trustInfo>
</assembly>

then add the manifest to the exe (Windows SDK required for mt.exe command)



"Path of the MT.exe"
   -manifest "$(ProjectDir)[application name].exe.manifest"
   -outputresource:"$(TargetDir)$(TargetFileName)";#1

in vc6++
"C:\Program Files\Microsoft Platform SDK\Bin\mt.exe" -manifest "file.exe.manifest" -outputresource:"Release/file.exe";#1

No comments:

Post a Comment