.bat脚本调用 .vbs脚本实现自动刷机

.bat脚本调用 .vbs脚本实现自动刷机

.bat脚本调用 .vbs脚本实现自动刷机_第1张图片
图片发自App


具体步骤如下:

首先写好.bat脚本 如下

@echo off

@start ping -n 2 127.1 >nul 10


adb shell reboot -p


rem start C:\Users\wangxiaosheng\Desktop\SP_Flash_Tool_exe_Windows_v5.1628.00.000\flash_tool.exe


rem Set WshShell=WScript.CreateObject("WScript.Shell").WshShell.SendKeys "^d"

rem pause

@start C:\Users\wangxiaosheng\Desktop\1.vbs

@exit


rem .bat 脚本调用.vbs 脚本实现手机先自动关机然后调用flash_tool.exe 实现自动刷机的功能  (备注rem 在.bat 文件中表示的是注释的含义。)

写好后保存为.Bat的形式。

然后写好.vbs的脚本

脚本内容如下:

'Set vbs=CreateObject("Wscript.Shell")

'vbs.Run "cmd",1

'adb shell reboot -p

'wscript.sleep 1000


Dim objws

Set objws=WScript.CreateObject("wscript.shell")

objws.Run "C:\Users\wangxiaosheng\Desktop\SP_Flash_Tool_exe_Windows_v5.1628.00.000\flash_tool.exe",1


wscript.sleep 3000


Set WshShell=WScript.CreateObject("WScript.Shell")

WshShell.SendKeys "^d"


'在.vbs 中表示的是注释的含义。

你可能感兴趣的:(.bat脚本调用 .vbs脚本实现自动刷机)