Files
management-scripts/Install-Wireguard.ps1
T

14 lines
727 B
PowerShell
Raw Normal View History

2020-11-19 17:50:42 -05:00
## Make sure we have an administrative token
If ( IsAdmin )
{
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' }
2020-11-19 17:50:42 -05:00
## Install package
Try { Start-Process "msiexec.exe" -ArgumentList "/i ${URL} /qn /norestart DO_NOT_LAUNCH=1" -Wait }
Catch { LogErr $_.Exception.Message }
2020-12-03 18:16:55 -05:00
## 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"
2020-11-19 17:50:42 -05:00
}
Else { LogMsg "Must be an administrator to install WireGuard" }