15 lines
546 B
PowerShell
15 lines
546 B
PowerShell
## Make sure we have an administrative token
|
|
If ( IsAdmin )
|
|
{
|
|
$URL = "https://download.wireguard.com/windows-client/wireguard-installer.exe"
|
|
|
|
## Install package
|
|
$Installer = Download-File -URL $URL
|
|
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" } |