Files
NexaVPN/desktop-client/src-tauri/windows/hooks.nsh
nessi 5003a2f0f7 feat: add automated WireGuard runtime installation for Windows desktop client with bundled MSI installer
Add install-runtime command to tunnel-helper for automated WireGuard installation on Windows. Download and bundle official WireGuard MSI during build process with automatic version discovery from wireguard.com.

Add ensure_windows_runtime_installed checks before connect/disconnect operations. Implement install_windows_runtime with UAC elevation prompt and install_windows_runtime_direct for MS
2026-03-24 18:35:19 +01:00

17 lines
721 B
NSIS

!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
nsExec::ExecToLog '"$INSTDIR\bundled\windows-x64\nexavpn-tunnel-helper.exe" install-runtime'
nsExec::ExecToLog '"$INSTDIR\bundled\windows-x64\nexavpn-tunnel-helper.exe" install-service'
!macroend
!macro NSIS_HOOK_PREUNINSTALL
nsExec::ExecToLog 'sc stop "WireGuardTunnel$NexaVPN"'
nsExec::ExecToLog '"$INSTDIR\bundled\windows-x64\nexavpn-tunnel-helper.exe" uninstall-service'
!macroend