BAT 实现批量复制+安装程序

@echo off
::用户名 admin 密码 12123 登录 192.168.2.29  并复制winSW 下所有文件至本地 C:\Users\admin\Documents\SoftWare\
title Auto Copy
net use  \\192.168.2.29 /user:"admin" 12123
xcopy  /y /e \\192.168.2.29\SoftWare\winSW\*  C:\Users\admin\Documents\SoftWare\
pause

::WinRAR
echo.
start /wait C:\Users\admin\Documents\Software\WinRAR_x64.exe /s
::如果error等于0,则输出 OK ,否则输出 error
if %errorlevel%==0 (echo  WinRAR x64 -- OK) else (echo  WinRAR x64 -- error)

::搜狗输入法
echo.
start /wait C:\Users\admin\Documents\Software\Sogoupinyin.exe /S
if %errorlevel%==0 (echo  SougouInput -- OK) else (echo  SougouInput -- error)


::Foxit Reader
echo.
start /wait C:\Users\admin\Documents\Software\FoxitReader.exe /VERYSILENT
if %errorlevel%==0 (echo  Foxit Reader -- OK) else (echo  Foxit Reader -- error)

::Chrome
echo.
start /wait C:\Users\admin\Documents\Software\Chrome.exe
if %errorlevel%==0 (echo  Chrome -- OK) else (echo  Chrome -- error)

::FoxMail
echo.
start /wait C:\Users\admin\Documents\Software\FoxMail.exe /S
if %errorlevel%==0 (echo  FoxMail -- OK) else (echo  Foxmail -- error)

::TIM
echo. 
start /wait C:\Users\admin\Documents\Software\TIM2.0.exe /S
if %errorlevel%==0 (echo  TIM -- OK) else (echo  TIM -- error)

::WeChat
echo.
start /wait C:\Users\admin\Documents\Software\WeChatSetup.exe /S
if %errorlevel%==0 (echo  Wechat -- OK) else (echo  Wechat -- error)

::清除右键、收藏夹
echo.
start /waitC:\Users\admin\Documents\Software\DelFavorite.bat
start /waitC:\Users\admin\Documents\Software\DelLeft.bat

echo.
pause


你可能感兴趣的:(bat)