install-pcvisit-remotehost.bat aktualisiert
This commit is contained in:
@@ -1,27 +1,22 @@
|
||||
@echo off
|
||||
setlocal
|
||||
|
||||
:: 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"
|
||||
set "URL=https://lb3.pcvisit.de/v1/hosted/jumplink?func=download&topic=remoteHostSetup&destname=pcvisit_Remote-Host_Setup&os=osWin32"
|
||||
|
||||
:: Zielpfad im Temp-Ordner
|
||||
set SETUPFILE="%TEMP%\pcvisit_Remote-Host_Setup.exe"
|
||||
set "SETUPFILE=%TEMP%\pcvisit_Remote-Host_Setup.exe"
|
||||
|
||||
:: 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% (
|
||||
powershell -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest -Uri '%URL%' -OutFile '%SETUPFILE%'"
|
||||
|
||||
if not exist "%SETUPFILE%" (
|
||||
echo Fehler: Die Datei konnte nicht heruntergeladen werden.
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
:: Installation starten
|
||||
echo Starte Installation...
|
||||
%SETUPFILE% /S /CompanyAccountId=F6684590965 /UseCompanyPreset
|
||||
"%SETUPFILE%" /S /CompanyAccountId=F6684590965 /UseCompanyPreset
|
||||
|
||||
:: Aufräumen
|
||||
del %SETUPFILE%
|
||||
del "%SETUPFILE%"
|
||||
|
||||
endlocal
|
||||
Reference in New Issue
Block a user