auto-register-verdent/start.bat
2025-11-13 16:56:08 +08:00

75 lines
1.6 KiB
Batchfile
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@echo off
chcp 65001 >nul
echo ========================================
echo Verdent 自动注册工具启动脚本
echo ========================================
echo.
REM 检查 Node.js 是否安装
where node >nul 2>nul
if %errorlevel% neq 0 (
echo [错误] 未检测到 Node.js请先安装 Node.js
echo 下载地址: https://nodejs.org/
pause
exit /b 1
)
echo [✓] Node.js 已安装
node --version
echo.
REM 检查是否已安装依赖
if not exist "node_modules\" (
echo [!] 检测到依赖未安装,开始安装...
echo.
call npm install
if %errorlevel% neq 0 (
echo [错误] 依赖安装失败
pause
exit /b 1
)
echo.
echo [✓] 依赖安装完成
echo.
) else (
echo [✓] 依赖已安装
echo.
)
REM 设置环境变量
set ADSPOWER_USER_ID=k16x0qt2
set ADSPOWER_API_KEY=
set DB_HOST=172.22.222.111
set DB_PORT=3306
set DB_USER=auto-register-verdent
set DB_PASS=Qichen5210523
set DB_NAME=auto-register-verdent
REM 提示检查
echo [注意] 请确保:
echo 1. AdsPower 已启动并登录
echo 2. 已在 AdsPower 中手动打开过配置文件一次
echo.
echo [启动] 3秒后开始运行...
timeout /t 3 /nobreak >nul
echo.
echo ========================================
echo 启动配置:
echo - AdsPower ID: %ADSPOWER_USER_ID%
echo - 数据库: %DB_HOST%:%DB_PORT%
echo - 数据库名: %DB_NAME%
echo ========================================
echo.
echo [启动] 开始运行注册程序...
echo 按 Ctrl+C 可停止程序
echo.
REM 启动程序
node index.js
REM 程序结束后暂停
echo.
echo ========================================
echo 程序已退出
pause