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

Popular posts from this blog

html5 - What is breaking my page when printing? -

c# - must be a non-abstract type with a public parameterless constructor in redis -

ajax - PHP/JSON Login script (Twitter style) not setting sessions -