Problem with InstallOptions-checking
Hello,
I have a strange problem concerning an InstallOptions-if-statement. I check whether a checkbox is activated or not and if so, write some file or registry entry.
But unfortunately $R1 is in both cases 0, although I checked the checkboxes (both of them).
Section "Program data" SEC01Could you please tell me, what's wrong here?
; Autostart-link
!insertmacro MUI_INSTALLOPTIONS_READ $R1 $R0 "Field 2" "State"
${if} $R1 == "1"
WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Run" "Prog" '"$INSTDIR\Prog.exe" hide'
${EndIf}
; Weitere Verknüpfungen ?
; Desktopverknüpfung
!insertmacro MUI_INSTALLOPTIONS_READ $R1 $R0 "Field 1" "State"
${if} $R1 == "1"
CreateShortCut "$DESKTOP\Prog.lnk" "$INSTDIR\Prog.exe"
${EndIf}
Thanks a lot!
Bye Defcon0