updated with static links (thanks to zx2c4 on freenode#wireguard)

This commit is contained in:
2020-12-04 14:08:24 -05:00
parent f8bc06984f
commit fd2fa90f22
+8 -13
View File
@@ -1,20 +1,15 @@
. 'C:\Users\dyoder\Emberkom\Data\Projects\development\management-scripts\Tools.ps1'
## Make sure we have an administrative token ## Make sure we have an administrative token
If ( IsAdmin ) If ( IsAdmin )
{ {
$URL = "https://download.wireguard.com/windows-client/wireguard-installer.exe" If ( Is64bit ) { $URL = 'https://download.wireguard.com/windows-client/wireguard-amd64-latest.msi' }
Else { $URL = 'https://download.wireguard.com/windows-client/wireguard-x86-latest.msi' }
## Download package ## Install package
$Installer = Download-File -URL $URL Try { Start-Process "msiexec.exe" -ArgumentList "/i ${URL} /qn /norestart DO_NOT_LAUNCH=1" -Wait }
If ( Test-Path $Installer ) { Catch { LogErr $_.Exception.Message }
## Install package ## Create shortcut on Public desktop
End-Process -Name "wireguard" -Match -Force #Create-Shortcut -Path "${Env:Public}\Desktop\WireGuard.LNK" -TargetPath "${Env:ProgramFiles}\WireGuard\wireguard.exe" -Description "WireGuard: Fast, Modern, Secure VPN Tunnel"
Install-Program -Path "${Installer}" -Delete
End-Process -Name "wireguard" -Match -Force
## Create shortcut on Public desktop
#Create-Shortcut -Path "${Env:Public}\Desktop\WireGuard.LNK" -TargetPath "${Env:ProgramFiles}\WireGuard\wireguard.exe" -Description "WireGuard: Fast, Modern, Secure VPN Tunnel"
}
Else { LogMsg "The WireGuard installer was not downloaded properly" }
} }
Else { LogMsg "Must be an administrator to install WireGuard" } Else { LogMsg "Must be an administrator to install WireGuard" }