Skip navigation

Because sometimes, it just has to run elevated…

< ?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="ASSEMBLY_NAME" type="win32"/>

      <trustinfo xmlns="urn:schemas-microsoft-com:asm.v3">
      <security>
         <requestedprivileges>
            <requestedexecutionlevel level="requireAdministrator"/>
         </requestedprivileges>

      </security>
   </trustinfo>
</assembly>

Embed the above file (after setting the correct assembly info, that is) as a Win32 resource, and you’re done! Bart De Smet wrote down how to do it. Visual Studio Orcas can do it OOB.

About these ads

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: