Old 24th September 2010, 16:09   #1
Damien_Karras
Junior Member
 
Join Date: Sep 2010
Posts: 4
Conditionals

Total newb here. I'm trying to get a handle on conditional statements in NSIS.

I want to check if a previous installation of a program exists and go from there:

code:
Section "Parse_Registry"
; parse registry information to determine if program is already installed
ReadRegStr $0 HKLM "System\ControlSet001\Control\Session Manager\Environment" "EIDMS"
$(If) $0 == ""
MessageBox MB_YESNOCANCEL "C:\SomeProg has not been created. Would you like to create it now?"
$(Else)
MessageBox MB_YESNOCANCEL "A previous version of SomeProg has been detected. Would you like to keep the settings?"
$(EndIf)
SectionEnd



I included LogicLib.nsh, yet when I compile I receive the error: "Invalid command: $(If)"

Syntax problems or logic problems? Thanks for your help.
Damien_Karras is offline   Reply With Quote
Old 24th September 2010, 16:51   #2
Damien_Karras
Junior Member
 
Join Date: Sep 2010
Posts: 4
Never mind... my monitor is crappy. I was using parentheses instead of curly braces.
Damien_Karras 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