Add update switch
This commit is contained in:
parent
dfb049f1fb
commit
4275cb5528
1 changed files with 16 additions and 10 deletions
|
@ -1,3 +1,7 @@
|
|||
param (
|
||||
[switch]$update
|
||||
)
|
||||
|
||||
# Enable TLSv1.2 for compatibility with older clients
|
||||
[Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12
|
||||
|
||||
|
@ -24,7 +28,8 @@ REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Uninstall\dsr" /f /v Dis
|
|||
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Uninstall\dsr" /f /v InstallLocation /t REG_SZ /d "$env:LOCALAPPDATA\DSR"
|
||||
|
||||
# Ask user to add a shortcut to the desktop
|
||||
if ($Host.UI.PromptForChoice(
|
||||
if (-not $update) {
|
||||
if ($Host.UI.PromptForChoice(
|
||||
"***********************",
|
||||
"Add a desktop shortcut?",
|
||||
@(
|
||||
|
@ -36,4 +41,5 @@ if ($Host.UI.PromptForChoice(
|
|||
$Shortcut = $WshShell.CreateShortcut("$Desktop\DSR.lnk")
|
||||
$Shortcut.TargetPath = "$env:LOCALAPPDATA\DSR\dsr.exe"
|
||||
$Shortcut.Save()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue