added Create-Shortcut function to Tools.ps1
updated Install-Wireguard to create a desktop shortcut after installation
This commit is contained in:
@@ -3,12 +3,17 @@ If ( IsAdmin )
|
||||
{
|
||||
$URL = "https://download.wireguard.com/windows-client/wireguard-installer.exe"
|
||||
|
||||
## Install package
|
||||
## Download package
|
||||
$Installer = Download-File -URL $URL
|
||||
If ( Test-Path $Installer ) {
|
||||
|
||||
## Install package
|
||||
End-Process -Name "wireguard" -Match -Force
|
||||
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" }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user