Newbie question
I am a newbie to NSIS. Could somebody please help me with this code.
I am trying to check if sql anywhere is installed ,if it is,I need to write a field in the ini file for each version(e.g 5,6,7,8) to retrieve in custom dialog(e.g SQL 8,SQL7...) to allow user to select the sql version installation.
Somehow even if I don't have verison 8 in the registry,Field gets written in the ini file. any help appreciated.
Sorry,it might be a stupid question but I looked everywhere for help.
Thanks in advance. Code attached( I have seperate function for each sql version)
Function IsAnywhere7Installed
Push $R0
ClearErrors
ReadRegStr $R0 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\SQL Anywhere Studio 7.0" ""
IfErrors lbl_na
StrCpy $R0 1
Goto lbl_end
lbl_na:
WriteINIStr "$PLUGINSDIR\IO.ini" "Field 5" "install" " none"
;WriteINIStr "$PLUGINSDIR\IO.ini" "Settings" "NumFields" " 5"
StrCpy $R0 0
lbl_end:
;Exch $R0
WriteINIStr "$PLUGINSDIR\IO.ini" "Field 5" "Type" " radiobutton"
WriteINIStr "$PLUGINSDIR\IO.ini" "Field 5" "Text" " SQL Anywhere Studio 7.0"
WriteINIStr "$PLUGINSDIR\IO.ini" "Field 5" "Left" " 110"
WriteINIStr "$PLUGINSDIR\IO.ini" "Field 5" "Right" " -10"
WriteINIStr "$PLUGINSDIR\IO.ini" "Field 5" "Top" " 70"
WriteINIStr "$PLUGINSDIR\IO.ini" "Field 5" "Bottom" " 80"
WriteINIStr "$PLUGINSDIR\IO.ini" "Settings" "NumFields" " 5"
FunctionEnd