Old 22nd June 2007, 15:41   #1
jcenter
Junior Member
 
Join Date: Jun 2007
Posts: 2
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
jcenter is offline   Reply With Quote
Old 22nd June 2007, 15:49   #2
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
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
Afrow UK is offline   Reply With Quote
Old 22nd June 2007, 16:43   #3
jcenter
Junior Member
 
Join Date: Jun 2007
Posts: 2
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
jcenter is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump