Archive: RestartRequired function help


RestartRequired function help
Hi,

I'm trying to use the RestartRequired function from http://nsis.sourceforge.net/Check_wh...restart_or_not and I get an error message when I compile it:

Error: could not resolve label "RestartRequired" in install section "SecureW2 Installer" (1)

My section starts like this:

Section "${APPLICATION}" SW2Install
SectionIn RO
# Check if user requests a restart...
#
Push $R1
Call RestartRequired
Exch $R1
StrCmp $R1 "1" RestartRequired RestartNotRequired

...

The function is cut & pasted from the webpage ahead of the section. I'm new at this, so it's probably something obvious. I greatly appreciate any help.

Thanks.

-John


RestartRequired and RestartNotRequired are label identifiers which one must put in a script like so:

RestartRequired:
...
Goto Done
RestartNotRequired:
...
Done:

I would recommend using LogicLib.nsh though:
${If} $R0 == 1
...
${Else}
...
${EndIf}

Stu


Hi Stu,

I thought it was complaining about the function call line. I see now the problem is the StrCmp line. I'll look into using LogicLib.

Thanks for your help.

-John