-
Notifications
You must be signed in to change notification settings - Fork 1
/
Start.bat
39 lines (33 loc) · 1.09 KB
/
Start.bat
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
@echo off
chcp 65001 >nul
title ESurfingDialer-Onekey Deamon
setlocal enabledelayedexpansion
set JAVA_HOME=.\jre
set "ver=2024-03-28"
set "config_file=config.txt"
if not exist "%config_file%" (
set /p "account=请输入你的账号: "
if "!account!"=="" exit
set /p "pwd=请输入你的密码: "
if "!pwd!"=="" exit
) else (
for /F "tokens=1,2 delims==" %%a in (%config_file%) do (
if "%%a"=="account" set account=%%b
if "%%a"=="pwd" set pwd=%%b
)
)
echo account=%account%>"%config_file%"
echo pwd=%pwd%>>"%config_file%"
echo 账号为%account%,密码为%pwd%,正在启动...
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%..
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
"%JAVA_EXE%" -jar ESurfingDialer-1.7.0-all.jar -u %account% -p %pwd%
if "%OS%"=="Windows_NT" endlocal