fix: correct Windows batch file syntax and config path consistency

Fixed critical Windows-specific bugs in portable USB scripts:
- Replaced Unix /dev/null with Windows nul in all batch files
- Unified config file path to use .openclaw/openclaw.json consistently
- Windows-Start.bat now uses same config structure as Windows-Menu.bat

Files modified:
- portable/Windows-Start.bat: Fix /dev/null syntax, unify config path
- portable/Windows-Menu.bat: Fix multiple /dev/null occurrences
- usb-scripts/Windows-Install.bat: Fix /dev/null syntax

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
hfshfg
2026-03-12 17:50:20 +08:00
parent 920fc06679
commit 11220537a0
3 changed files with 16 additions and 14 deletions

View File

@@ -1,5 +1,5 @@
@echo off
chcp 65001 >/dev/null 2>&1
chcp 65001 >nul 2>&1
title U-Claw Menu
set "UCLAW_DIR=%~dp0"
@@ -86,7 +86,7 @@ echo.
echo Starting gateway...
set PORT=18789
:find_port
netstat -an | findstr ":%PORT% " | findstr "LISTENING" >/dev/null 2>&1
netstat -an | findstr ":%PORT% " | findstr "LISTENING" >nul 2>&1
if %errorlevel%==0 (
set /a PORT+=1
if %PORT% gtr 18799 (echo No available port & pause & goto :menu)
@@ -154,7 +154,7 @@ set "TS=%TS: =0%"
set "BK=%DATA_DIR%\backups\backup_%TS%"
mkdir "%BK%" 2>nul
if exist "%STATE_DIR%\openclaw.json" copy "%STATE_DIR%\openclaw.json" "%BK%\" >nul
if exist "%DATA_DIR%\memory" xcopy /s /q "%DATA_DIR%\memory" "%BK%\memory\" >/dev/null 2>nul
if exist "%DATA_DIR%\memory" xcopy /s /q "%DATA_DIR%\memory" "%BK%\memory\" >nul 2>nul
echo Backup saved: %BK%
pause
goto :menu