chcp 65001
REM 管理员权限打开
%1 mshta vbscript:CreateObject("Shell.Application").ShellExecute("cmd.exe","/c %~s0 ::","","runas",1)(window.close)&&exit
cd /d "%~dp0"
:Admin
REM 设置UTF-8的字符集
chcp 65001
@echo off
echo ------------------------------------------------
echo 当前adb版本为:
adb version
echo ------------------------------------------------
echo 输入要使用的java版本对应的选项:
echo 选项 含义
echo ------------------------------------------------
echo 1 切换环境为adb_version 1.0.29 低版本解包和打包
echo 2 切换环境为adb_version 1.0.41 可以在系统直接修改
echo ------------------------------------------------
setlocal
set /P choose=请输入选择:
IF "%choose%"=="1" (
setx ADB_HOME "C:\rk_adb_tools" /m
echo adb_version 1.0.29 修改成功
) ELSE IF "%choose%"=="2" (
setx ADB_HOME "C:\platform-tools" /m
echo adb_version 1.0.41 修改成功
) ELSE (
echo 输入错误!
)
endlocal
pause
bat语言切换adb_home
最新推荐文章于 2024-11-07 22:57:55 发布