Files
install-pcvisit-remotehost/install-pcvisit-remotehost.bat

27 lines
861 B
Batchfile

@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"
:: Zielpfad im Temp-Ordner
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% (
echo Fehler: Die Datei konnte nicht heruntergeladen werden.
exit /b 1
)
:: Installation starten
echo Starte Installation...
%SETUPFILE% /S /CompanyAccountId=F6684590965 /UseCompanyPreset
:: Aufräumen
del %SETUPFILE%
endlocal