app RustDesk hinzugefügt
This commit is contained in:
48
app/install_rustdesk.cmd
Normal file
48
app/install_rustdesk.cmd
Normal file
@@ -0,0 +1,48 @@
|
||||
:: ------------------------------------------------------------
|
||||
:: Installationsroutine
|
||||
:: ------------------------------------------------------------
|
||||
|
||||
:: --- Option: Download in ein temporäres Verzeichnis
|
||||
:: --- Kann für z.B. für GLPI abgeschaltet werden
|
||||
set SAVEPATH=%SYSTEMDRIVE%\TEMP\install
|
||||
MKDIR %SAVEPATH% & CD /D %SAVEPATH%
|
||||
|
||||
:: --- Download Basis-URL, Dateiname und TEMP-Verzeichnis
|
||||
set VERS=1.4.1
|
||||
set ARCH=x86_64
|
||||
set BASEURL=https://github.com/rustdesk/rustdesk/releases/download/%VERS%
|
||||
set PROG=rustdesk-%VERS%-%ARCH%.exe
|
||||
|
||||
:: --- Lade Installationsdatei herunter
|
||||
curl -k -L %BASEURL%/%PROG% -o %SAVEPATH%\%PROG%
|
||||
|
||||
:: --- Silent-Installation des Programms:
|
||||
%PROG% --silent-install
|
||||
timeout /t 15
|
||||
%PROG% --install-service
|
||||
timeout /t 15
|
||||
|
||||
:: --- Ermittle RustDesk ID
|
||||
for /f "delims=" %%i in ('rustdesk.exe --get-id ^| more') do set rustdesk_id=%%i
|
||||
|
||||
:: --- Erzeuge ein zufälliges Passwort:
|
||||
setlocal ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
|
||||
set alfanum=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
|
||||
set rustdesk_pw=
|
||||
for /L %%b in (1, 1, 12) do (
|
||||
set /A rnd_num=!RANDOM! %% 62
|
||||
for %%c in (!rnd_num!) do (
|
||||
set rustdesk_pw=!rustdesk_pw!!alfanum:~%%c,1!
|
||||
)
|
||||
)
|
||||
|
||||
%PROG% --password %rustdesk_pw%
|
||||
|
||||
:: Hier den RustDesk Config-String einsetzen, falls vorhanden und "::" entfernen
|
||||
:: set rustdesk_cfg=
|
||||
:: %PROG% --config %rustdesk_cfg%
|
||||
|
||||
echo ------------------------------------------------
|
||||
echo RustDesk ID: %rustdesk_id%
|
||||
echo Password: %rustdesk_pw%
|
||||
echo ------------------------------------------------
|
Reference in New Issue
Block a user