Click here to Skip to main content
15,888,082 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
have a windows application in c # and work with the Windows registry. In Windows 7 it is restricted for security but I know that impersonating the application through a config file can remove this restriction.

Please help.
Posted
Updated 26-Apr-10 4:38am
v2

1 solution

In your manifest file:

XML
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
   <security>
      <requestedPrivileges>
         <requestedExecutionLevel level="requireAdministrator" uiAccess="false"/>
      </requestedPrivileges>
   </security>
</trustInfo>


Note that that this will not remove the UAC prompt, it will just ensure that your app always requires elevation.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900