Archive: IsUserAdmin


IsUserAdmin
Hello,

I use the script IsUserAdmin from:
http://nsis.sourceforge.net/IsUserAdmin

Now I want to check before uninstalling whether the user has admin rights:

Function un.onInit
!insertmacro MUI_UNGETLANGUAGE
Call IsUserAdmin
Pop $R0
${if} $R0 == "0"
Abort
${EndIf}
FunctionEnd
But it says:
!insertmacro: end of MUI_UNGETLANGUAGE
Call must be used with function names starting with "un." in the uninstall section.
Usage: Call function_name | [:label_name]
Error in script "C:\Documents and Settings\Administrator\Desktop\Setup\Setup.nsi" on line 292 -- aborting creation process
What am I doing wrong ?
Bye Defcon

As the error says, you must use functions with names prefixed with "un." in uninstall code. Add "un." to the function name and try again.