add check in Windows setup if software is already running

This commit is contained in:
Volker Fischer 2011-05-09 18:09:38 +00:00
parent 856bd35039
commit 8d6a1b45c4

View file

@ -28,6 +28,13 @@ Page instfiles
Section Section
; check if software is currently running
FindProcDLL::FindProc "${APP_EXE}"
IntCmp $R0 1 0 notRunning
MessageBox MB_OK|MB_ICONEXCLAMATION "${APP_NAME} is running. Please close it and run the setup again." /SD IDOK
Abort
notRunning:
; add reg keys so that software appears in Windows "Add/Remove Software" ; add reg keys so that software appears in Windows "Add/Remove Software"
WriteRegStr HKLM "${UNINST_KEY}" "DisplayName" "${APP_NAME} (remove only)" WriteRegStr HKLM "${UNINST_KEY}" "DisplayName" "${APP_NAME} (remove only)"
WriteRegStr HKLM "${UNINST_KEY}" "UninstallString" '"$INSTDIR\${UNINSTALL_EXE}"' WriteRegStr HKLM "${UNINST_KEY}" "UninstallString" '"$INSTDIR\${UNINSTALL_EXE}"'