forked from Wechat-ggGitHub/wechat-claude-code
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathreset-windows.cmd
More file actions
42 lines (33 loc) · 1003 Bytes
/
reset-windows.cmd
File metadata and controls
42 lines (33 loc) · 1003 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
@echo off
setlocal
cd /d "%~dp0"
set YES=0
if /I "%~1"=="--yes" set YES=1
if defined WOC_DATA_DIR (
set "DATA_DIR=%WOC_DATA_DIR%"
) else (
set "DATA_DIR=%USERPROFILE%\.wechat-opencode"
)
echo == WeChat OpenCode login reset ==
echo This will stop the bridge and remove WeChat account bindings.
echo Kept: %DATA_DIR%\config.env
echo Removed: accounts, sessions, sync buffer, QR image
echo.
if "%YES%"=="0" (
choice /C YN /N /M "Continue? [Y/N] "
if errorlevel 2 (
echo Cancelled.
exit /b 0
)
)
if exist dist\daemon.js (
call npm run daemon -- stop
)
call stop-windows.cmd --no-pause
if exist "%DATA_DIR%\accounts" rmdir /S /Q "%DATA_DIR%\accounts"
if exist "%DATA_DIR%\sessions" rmdir /S /Q "%DATA_DIR%\sessions"
if exist "%DATA_DIR%\get_updates_buf" del /F /Q "%DATA_DIR%\get_updates_buf"
if exist "%DATA_DIR%\qrcode.png" del /F /Q "%DATA_DIR%\qrcode.png"
echo.
echo Reset complete. Run start.vbs or npm run setup to scan a new WeChat account.
if /I not "%~1"=="--yes" pause