mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
[Windows] Installer/Uninstaller notification when Hyperion is running. (#1033)
This commit is contained in:
BIN
cmake/nsis/template/FindProcDLL.dll
Normal file
BIN
cmake/nsis/template/FindProcDLL.dll
Normal file
Binary file not shown.
@@ -384,7 +384,7 @@ Function un.RemoveFromPath
|
||||
FunctionEnd
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; Uninstall sutff
|
||||
; Uninstall stuff
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
###########################################
|
||||
@@ -810,6 +810,15 @@ FunctionEnd
|
||||
;--------------------------------
|
||||
; determine admin versus local install
|
||||
Function un.onInit
|
||||
; Check if Hyperion is running
|
||||
loopIsRunningCheck:
|
||||
FindProcDLL::FindProc "hyperiond.exe"
|
||||
IntCmp $R0 1 0 notRunning
|
||||
MessageBox MB_RETRYCANCEL|MB_ICONEXCLAMATION "Hyperion is running.$\n$\nClose it and press Retry, or press Cancel to exit." IDRETRY loopIsRunningCheck IDCANCEL abortnow
|
||||
|
||||
abortnow:
|
||||
Abort
|
||||
notRunning:
|
||||
|
||||
ClearErrors
|
||||
UserInfo::GetName
|
||||
@@ -873,6 +882,16 @@ FunctionEnd
|
||||
;Uninstaller Section
|
||||
|
||||
Section "Uninstall"
|
||||
; Check if Hyperion is running
|
||||
loopIsRunningCheck:
|
||||
FindProcDLL::FindProc "hyperiond.exe"
|
||||
IntCmp $R0 1 0 notRunning
|
||||
MessageBox MB_RETRYCANCEL|MB_ICONEXCLAMATION "Hyperion is running.$\n$\nClose it and press Retry, or press Cancel to exit." IDRETRY loopIsRunningCheck IDCANCEL abortnow
|
||||
|
||||
abortnow:
|
||||
Abort
|
||||
notRunning:
|
||||
|
||||
ReadRegStr $START_MENU SHCTX \
|
||||
"Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@" "StartMenu"
|
||||
;MessageBox MB_OK "Start menu is in: $START_MENU"
|
||||
@@ -970,6 +989,16 @@ SectionEnd
|
||||
; "Program Files" for AllUsers, "My Documents" for JustMe...
|
||||
|
||||
Function .onInit
|
||||
; Check if Hyperion is running
|
||||
loopIsRunningCheck:
|
||||
FindProcDLL::FindProc "hyperiond.exe"
|
||||
IntCmp $R0 1 0 notRunning
|
||||
MessageBox MB_RETRYCANCEL|MB_ICONEXCLAMATION "Hyperion is running.$\n$\nClose it and press Retry, or press Cancel to exit." IDRETRY loopIsRunningCheck IDCANCEL abortnow
|
||||
|
||||
abortnow:
|
||||
Abort
|
||||
notRunning:
|
||||
|
||||
StrCmp "@CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL@" "ON" 0 inst
|
||||
|
||||
ReadRegStr $0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@" "UninstallString"
|
||||
|
Reference in New Issue
Block a user