SirWayne
28th August 2012 09:02 UTC
Admin rights
Hello,
i created with EclipseNsis a setup.nsi file and myProject.exe. The executable have to start by a user with admin rigths. How I configure admin rights in the setup.nsi?
My trial (but nothing has changed):
RequestExecutionLevel highest
The Faq site is empty =)
http://nsis.sourceforge.net/How_can_...s_admin_rightsThanks :)
MSG
28th August 2012 09:43 UTC
It is not emtpy. It says "Use the UserInfo plug-in. For an example see the 'Examples\UserInfo' folder."
However, this info is incomplete. On Vista and higher, you should also add a requestexecutionlevel admin. (However, remember that this is only an extra for when UAC is turned on. If UAC is turned off, requestexecutionlevel is completely ignored by Windows.) Here's the proper way to do it:
http://pastebin.com/EvMkyLLt
SirWayne
28th August 2012 12:04 UTC
Originally posted by MSG
It is not emtpy. It says "Use the UserInfo plug-in. For an example see the 'Examples\UserInfo' folder."
Yes but there is no example or i didn't find the example.
Originally posted by MSG
However, this info is incomplete. On Vista and higher, you should also add a requestexecutionlevel admin. (However, remember that this is only an extra for when UAC is turned on. If UAC is turned off, requestexecutionlevel is completely ignored by Windows.) Here's the proper way to do it:
http://pastebin.com/EvMkyLLt
Thanks i try it.
Afrow UK
28th August 2012 12:36 UTC
UserInfo::GetAccountType
Pop $R0 ; = "Admin"
Stu