c++ - Administrator rights for Windows application -
i need create , write file under c:\ on windows. obviusly require administrator right.
my application consist on:
- the core (.exe)
- two .dll
now, saw lot of time software (like games) require admin right during installation , after can whatever want; how possible?
how via c++ ?
if want application run administrator, can specify in application's manifest file.
specifically, need add this:
<trustinfo xmlns="urn:schemas-microsoft-com:asm.v2"> <security> <requestedprivileges> <requestedexecutionlevel level="requireadministrator" uiaccess="false"/> </requestedprivileges> </security> </trustinfo>
more on application manifest files can found in msdn.
Comments
Post a Comment