Archive: Admin rights


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_rights


Thanks :)

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


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.

UserInfo::GetAccountType
Pop $R0 ; = "Admin"

Stu