From 5309e66d3f8de6e65df4ba3d30da316eb90d3212 Mon Sep 17 00:00:00 2001 From: dyoder Date: Thu, 3 Dec 2020 17:48:24 -0500 Subject: [PATCH] kill wireguard before and after install --- Install-Wireguard.ps1 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Install-Wireguard.ps1 b/Install-Wireguard.ps1 index 6c83a51..761305d 100644 --- a/Install-Wireguard.ps1 +++ b/Install-Wireguard.ps1 @@ -5,7 +5,11 @@ If ( IsAdmin ) ## Install package $Installer = Download-File -URL $URL - If ( Test-Path $Installer ) { Install-Program -Path "${Installer}" -Delete } + If ( Test-Path $Installer ) { + End-Program -Name "wireguard" -Match -Force + Install-Program -Path "${Installer}" -Delete + End-Program -Name "wireguard" -Match -Force + } Else { LogMsg "The Wireguard installer was not downloaded properly" } } Else { LogMsg "Must be an administrator to install Wireguard" } \ No newline at end of file