@echo off setlocal title DeepSeek Harness Installer (Online) echo ============================================ echo DeepSeek Harness Desktop - Online Install echo ============================================ echo. REM ---- 1. Node.js ---- where node >nul 2>nul if %errorlevel%==0 ( echo [1/5] Node.js detected goto node_ok ) echo [1/5] Node.js not found, installing via winget... winget install --id OpenJS.NodeJS.LTS -e --accept-source-agreements --accept-package-agreements if %errorlevel% neq 0 ( echo. echo [ERROR] Node.js install failed. Please install manually from https://nodejs.org (LTS), then run this script again. pause exit /b 1 ) set "PATH=%PATH%;C:\Program Files\nodejs;%APPDATA%\npm" :node_ok REM ---- 2. npm registry (mirror for speed) ---- echo [2/5] Setting npm mirror registry... call npm config set registry https://registry.npmmirror.com REM ---- 3. Install dsh ---- echo [3/5] Installing DeepSeek Harness (dsh)... call npm install -g @deepseek-ai/dsh if %errorlevel% neq 0 ( echo. echo [ERROR] dsh install failed. Check network and retry. pause exit /b 1 ) REM ---- 4. Deploy app ---- echo [4/5] Deploying application... set "DEST=%LOCALAPPDATA%\DeepSeekHarness" if not exist "%DEST%" mkdir "%DEST%" xcopy /E /I /Y app "%DEST%\app" >nul copy /Y dsh.ico "%DEST%\" >nul copy /Y README.md "%DEST%\" >nul REM ---- 5. Register uninstall (Apps & Features) ---- echo [5/5] Registering uninstall entry... copy /Y uninstall.vbs "%DEST%\" >nul copy /Y register-uninstall.ps1 "%DEST%\" >nul powershell -NoProfile -ExecutionPolicy Bypass -File "%DEST%\register-uninstall.ps1" REM ---- 6. Desktop shortcut ---- powershell -NoProfile -ExecutionPolicy Bypass -Command "$s=(New-Object -ComObject WScript.Shell).CreateShortcut([Environment]::GetFolderPath('Desktop')+'\DeepSeek Harness.lnk');$s.TargetPath='%DEST%\app\dsh-app.exe';$s.IconLocation='%DEST%\dsh.ico,0';$s.WorkingDirectory='%DEST%\app';$s.Save()" echo. echo Install complete! Launching... start "" "%DEST%\app\dsh-app.exe" pause