Fix: split into bat launcher + ps1, TLS 1.2, single-session PATH fix, Server 2016 compat

This commit is contained in:
2026-05-04 12:06:45 +02:00
parent 0bd49190e2
commit 652c47c2d2

View File

@ -1,77 +1,4 @@
@echo off @echo off
setlocal EnableDelayedExpansion
chcp 65001 >/dev/null chcp 65001 >/dev/null
powershell -NoProfile -ExecutionPolicy Bypass -File "%~dp0setup-windows.ps1"
echo ============================================================
echo upterm Setup
echo ============================================================
echo.
:: Adminrechte prüfen
net session >/dev/null 2>&1
if %errorLevel% neq 0 (
echo Starte mit Administratorrechten neu...
powershell -Command "Start-Process '%~f0' -Verb RunAs"
exit /b
)
:: Execution Policy setzen
echo [1/4] Setze PowerShell Execution Policy...
powershell -Command "Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser -Force"
if %errorLevel% neq 0 (
echo FEHLER: Execution Policy konnte nicht gesetzt werden.
pause & exit /b 1
)
echo OK
:: Scoop prüfen / installieren
echo [2/4] Prüfe Scoop...
powershell -Command "Get-Command scoop" >/dev/null 2>&1
if %errorLevel% neq 0 (
echo Scoop nicht gefunden - wird installiert...
powershell -Command "Invoke-RestMethod -Uri https://get.scoop.sh | Invoke-Expression"
if !errorLevel! neq 0 (
echo FEHLER: Scoop Installation fehlgeschlagen.
pause & exit /b 1
)
echo Scoop installiert.
) else (
echo Scoop bereits vorhanden.
)
:: lessmsi aktivieren + 7zip installieren
echo [3/4] Installiere 7zip via lessmsi...
powershell -Command "scoop config use_lessmsi true"
powershell -Command "scoop install 7zip" >/dev/null 2>&1
if %errorLevel% neq 0 (
echo 7zip fehlgeschlagen - bereinige und versuche erneut...
powershell -Command "scoop uninstall 7zip; scoop cache rm 7zip; Remove-Item -Recurse -Force "$env:USERPROFILE\scoop\apps\7zip" -ErrorAction SilentlyContinue; scoop install 7zip"
if !errorLevel! neq 0 (
echo FEHLER: 7zip konnte nicht installiert werden.
pause & exit /b 1
)
)
echo OK
:: upterm installieren
echo [4/4] Installiere upterm...
powershell -Command "scoop bucket add upterm https://github.com/owenthereal/scoop-upterm; scoop install upterm"
if %errorLevel% neq 0 (
echo FEHLER: upterm Installation fehlgeschlagen.
pause & exit /b 1
)
echo OK
echo.
echo ============================================================
echo Installation abgeschlossen!
echo ============================================================
echo.
echo PowerShell neu starten, dann Session teilen mit:
echo.
echo upterm host --server ssh://upterm.ebesch.de:2222 --accept
echo.
echo Client verbindet sich mit:
echo ssh TOKEN:HASH@upterm.ebesch.de -p 2222
echo.
pause pause