[WIP] Fix minor bugs

This commit is contained in:
Vladimir Stoilov 2024-10-08 09:47:29 +03:00
parent a79be8b6a9
commit a8517cd65f
No known key found for this signature in database
GPG key ID: 2F190B67A43A81AF
6 changed files with 21 additions and 17 deletions

View file

@ -25,11 +25,15 @@
!macroend
!macro NSIS_HOOK_POSTINSTALL
ExecWait 'sc.exe create PortmasterCore binPath= "$INSTDIR\portmaster-core.exe" --data="$COMMONPROGRAMDATA\Portmaster\data"'
ExecWait 'sc.exe create PortmasterCore binPath= "$INSTDIR\portmaster-core.exe" --data="$COMMONPROGRAMDATA\Portmaster\data"' $0
IntCmp $0 0 +2
MessageBox MB_OK "Failed to create PortmasterCore service."
!macroend
!macro NSIS_HOOK_PREUNINSTALL
ExecWait 'sc.exe stop PortmasterCore'
ExecWait 'sc.exe delete PortmasterCore'
ExecWait 'sc.exe stop PortmasterCore' $0
; Ignore errors if the service is not running
ExecWait 'sc.exe delete PortmasterCore' $0
; Ignore errors if the service does not exist
!macroend