Hey, I'm learning the NSIS program, I'm trying to do an installer that checks if a program is installed. Unfortunately, no luck. I would like to do a condition that checks for specific registers if is exist that sets it as the default for installation and omits the window with the choice of installation path. If there is no such entry in the registry, it does not skip windows with the choice of the installation path.
I've tried a few tips but I still have a problem.
My code looks like this:
I've tried a few tips but I still have a problem.
My code looks like this:
I am asking for help because I can not deal with it.code:
Function findDirectory
ClearErrors
ReadRegStr $0 HKLM \
"Software\Microsoft\Windows\CurrentVersion\Uninstall\Steam App 409720" "InstallLocation"
${IF} ${Errors}
MessageBox MB_OK "Not exist"
${ELSE}
${IF} $0 == ""
MessageBox MB_OK "Exist and is empty"
${ELSE}
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Steam App 409720" "InstallLocation" ""
${ENDIF}
${ENDIF}
FunctionEnd
Comment