diff --git a/install-pcvisit-remotehost.bat b/install-pcvisit-remotehost.bat index df1720e..7c8e28e 100644 --- a/install-pcvisit-remotehost.bat +++ b/install-pcvisit-remotehost.bat @@ -1,15 +1,15 @@ @echo off setlocal -:: URL der Datei -#set URL="https://d1kh5e79chg49w.cloudfront.net/1df94a62cfadb6a8a500f50293433e9d/pcvisit_Remote-Host_Setup.exe" +:: Der Permalink, der immer auf die aktuellste Version zeigt set URL="https://lb3.pcvisit.de/v1/hosted/jumplink?func=download&topic=remoteHostSetup&destname=pcvisit_Remote-Host_Setup&os=osWin32" -:: Zielpfad für die heruntergeladene Datei +:: Zielpfad im Temp-Ordner set SETUPFILE="%TEMP%\pcvisit_Remote-Host_Setup.exe" -:: Datei herunterladen -powershell -Command "Start-BitsTransfer -Source %URL% -Destination %SETUPFILE%" +:: Download mit Invoke-WebRequest (folgt Redirects automatisch) +echo Lade aktuelle Version herunter... +powershell -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; Invoke-WebRequest -Uri %URL% -OutFile %SETUPFILE%" :: Prüfen, ob der Download erfolgreich war if not exist %SETUPFILE% ( @@ -18,9 +18,10 @@ if not exist %SETUPFILE% ( ) :: Installation starten -%SETUPFILE% /S /CompanyAccountId=F6684590965 /UseCompanyPreset +echo Starte Installation... +%SETUPFILE% /S /CompanyAccountId=F6684590965 /UseCompanyPreset -:: Aufräumen (optional) +:: Aufräumen del %SETUPFILE% endlocal \ No newline at end of file