feat: add pre-installation cleanup with service and process termination
Add NSIS_HOOK_PREINSTALL macro that stops WireGuardTunnel$NexaVPN service, kills nexavpn-desktop.exe and nexavpn-tunnel-helper.exe processes, and stops NexaVPNTunnelService before installation. Add WireGuardTunnel$NexaVPN service stop to NSIS_HOOK_PREUNINSTALL before service uninstallation.
This commit is contained in:
@@ -1,7 +1,15 @@
|
|||||||
|
!macro NSIS_HOOK_PREINSTALL
|
||||||
|
nsExec::ExecToLog 'sc stop "WireGuardTunnel$NexaVPN"'
|
||||||
|
nsExec::ExecToLog '"$SYSDIR\\taskkill.exe" /F /IM nexavpn-desktop.exe'
|
||||||
|
nsExec::ExecToLog '"$SYSDIR\\taskkill.exe" /F /IM nexavpn-tunnel-helper.exe'
|
||||||
|
nsExec::ExecToLog 'sc stop NexaVPNTunnelService'
|
||||||
|
!macroend
|
||||||
|
|
||||||
!macro NSIS_HOOK_POSTINSTALL
|
!macro NSIS_HOOK_POSTINSTALL
|
||||||
nsExec::ExecToLog '"$INSTDIR\bundled\windows-x64\nexavpn-tunnel-helper.exe" install-service'
|
nsExec::ExecToLog '"$INSTDIR\bundled\windows-x64\nexavpn-tunnel-helper.exe" install-service'
|
||||||
!macroend
|
!macroend
|
||||||
|
|
||||||
!macro NSIS_HOOK_PREUNINSTALL
|
!macro NSIS_HOOK_PREUNINSTALL
|
||||||
|
nsExec::ExecToLog 'sc stop "WireGuardTunnel$NexaVPN"'
|
||||||
nsExec::ExecToLog '"$INSTDIR\bundled\windows-x64\nexavpn-tunnel-helper.exe" uninstall-service'
|
nsExec::ExecToLog '"$INSTDIR\bundled\windows-x64\nexavpn-tunnel-helper.exe" uninstall-service'
|
||||||
!macroend
|
!macroend
|
||||||
|
|||||||
Reference in New Issue
Block a user