Jump to content
Tuts 4 You

Require administrator in MASM ???


CodeExplorer

Recommended Posts

CodeExplorer
Posted

Require administrator in MASM ???
How to do it?

Tried with this manifest.xml

<?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="Name of your application" type="win32"></assemblyidentity>
   <description>Description of your application</description>
   <!-- Identify the application security requirements. -->
   <trustinfo xmlns="urn:schemas-microsoft-com:asm.v2">
      <security>
         <requestedprivileges>
            <requestedexecutionlevel level="requireAdministrator" uiAccess="false"></requestedexecutionlevel>
         </requestedprivileges>
      </security>
   </trustinfo>
</assembly>

in rsrc.rc
//
// Manifest resources
//
LANGUAGE 0, 0
1                  RT_MANIFEST    ".\\app.manifest"

But it doesn't work!
 

 

CodeExplorer
Posted

Solved my problem.
Just replaced LANGUAGE 0, 0
1                  RT_MANIFEST    ".\\app.manifest"
WITH:
1 MANIFEST DISCARDABLE "app.manifest"

All works ok now!
 

  • Like 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...