nsis windows installer detect running, ask to not, abort

This commit is contained in:
Dan Ballard 2022-04-20 14:25:36 -07:00
parent b29836ed3b
commit a6c7682c84
1 changed files with 11 additions and 0 deletions

View File

@ -45,6 +45,17 @@ InstallDirRegKey HKCU "Software\Cwtch" "installLocation"
ShowInstDetails show
; Init / make sure isn't running
; https://nsis.sourceforge.io/Check_whether_your_application_is_running
Function .onInit
FindProcDLL::FindProc "Cwtch.exe"
StrCmp $R0 "1" found not_found
found:
MessageBox MB_ICONEXCLAMATION|MB_OK "Cwtch is still running, please exit it before running installer" /SD IDOK
Abort
not_found:
; Pages --------