|
|
#1 |
|
Junior Member
Join Date: Feb 2006
Posts: 6
|
Using If Statements
Hey guys
I need some help with NSIS. I'm reading some variables from registry and if the variable doesn't exists i need to read it from some other locations in registry. i'm using ReadRegDWORD command to read registry and this is how my command looks like ReadRegDWORD $PROGDIR HKCU "Software\Microsoft\Office\9.0\Word\Options" "PROGRAMDIR" where $PROGDIR is a variable that i have defined in the script ReadRegDWORD would set this variable as empty if it doesn't find it. so in that case i have to serach it from some other location. for this purpose i tried to use the following statement ${If} $PROGDIR == "" ReadRegDWORD $PROGDIR HKCU "Software\Microsoft\Office\10.0\Word\Options" "PROGRAMDIR" ${ElseIf} $PROGDIR == "" ReadRegDWORD $PROGDIR HKCU "Software\Microsoft\Office\11.0\Word\Options" "PROGRAMDIR" ${EndIf} but while compiling this script i'm getting the error Invalid Command ${If} Can someone help me to find what i'm doing wrong. Thanks very much |
|
|
|
|
|
#2 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,343
|
Add the following at the top of your script:
code: NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Feb 2006
Posts: 6
|
It works now
Thanks very much.
|
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|