Add update switch

This commit is contained in:
Mylloon 2024-05-17 19:25:09 +02:00
parent dfb049f1fb
commit 4275cb5528
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -1,3 +1,7 @@
param (
[switch]$update
)
# Enable TLSv1.2 for compatibility with older clients # Enable TLSv1.2 for compatibility with older clients
[Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12 [Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12
@ -24,6 +28,7 @@ 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" 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 # Ask user to add a shortcut to the desktop
if (-not $update) {
if ($Host.UI.PromptForChoice( if ($Host.UI.PromptForChoice(
"***********************", "***********************",
"Add a desktop shortcut?", "Add a desktop shortcut?",
@ -37,3 +42,4 @@ if ($Host.UI.PromptForChoice(
$Shortcut.TargetPath = "$env:LOCALAPPDATA\DSR\dsr.exe" $Shortcut.TargetPath = "$env:LOCALAPPDATA\DSR\dsr.exe"
$Shortcut.Save() $Shortcut.Save()
} }
}