一键升级一楼

对应版本:V20231122.1422

@echo off

::强制获取管理员运行权限
%1 mshta vbscript:CreateObject("Shell.Application").ShellExecute("cmd.exe","/c %~s0 ::","","runas",1)(window.close)&&exit
::taskkill /f /im iSmartPLCDataCollect.exe
taskkill /f /im python.exe
taskkill /f /im main.exe
timeout 2

::cd D:\software

set ymd=%date:~0,4%-%date:~5,2%-%date:~8,2%
set hms=%time:~0,2%-%time:~3,2%-%time:~6,2%
set dt=%ymd%_%hms%
::ren D:\software\Debug Debug_backup_%dt%
ren D:\software\huzhou_svolt_govion_241 huzhou_svolt_govion_241_backup_%dt%

timeout 2
winrar x -ad D:\software\2023-11-22\huzhou_svolt_govion_241_V20231122.1422.zip
echo "unzip success"
timeout 2
xcopy /D "D:\software\2023-11-22\huzhou_svolt_govion_241_V20231122.1422\*" "D:\software\*" /E

::timeout 2
::cd D:\software
::md Debug
::xcopy /D "D:\software\2023-10-17\Debug\*" "D:\software\Debug\*" /E

cd /d "D:\software\huzhou_svolt_govion_241\huzhou_svolt_govion_241"
start dcs_service_start.bat

timeout 2

cd /d "D:\software\huzhou_svolt_govion_241\pyqt5\dist"
start main.exe

timeout 2
echo "all success"

你可能感兴趣的:(python,开发语言)