add switch to create desktop shortcut

This commit is contained in:
2020-12-22 11:02:15 -05:00
parent 6b696c9f90
commit b896fb6325
+6 -1
View File
@@ -1,3 +1,6 @@
## Create a desktop shortcut for WireGuard?
$CreateDesktopShortcut = $false
## Make sure we have an administrative token
If ( IsAdmin )
{
@@ -9,6 +12,8 @@ If ( IsAdmin )
Catch { LogErr $_.Exception.Message }
## 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"
If ( $CreateDesktopShortcut ) {
Create-Shortcut -Path "${Env:Public}\Desktop\WireGuard.LNK" -TargetPath "${Env:ProgramFiles}\WireGuard\wireguard.exe" -Description "WireGuard: Fast, Modern, Secure VPN Tunnel"
}
}
Else { LogMsg "Must be an administrator to install WireGuard" }