Windows批处理:自动开关程序

公司有台14年组装的PC,时常无故重启,所以编写了个然并卵的批处理来测试稳定性。

 

打开程序.bat

@echo off
title Start Software
color 2F

:0
"C:\Program Files\Adobe\Adobe Photoshop CS5 (64 Bit)\Photoshop.exe"
ping -n 6 127.0.0.1>%temp%\1.tmp
"C:\Program Files (x86)\Adobe\Adobe Dreamweaver CS5\Dreamweaver.exe"
ping -n 6 127.0.0.1>%temp%\1.tmp
"C:\Program Files (x86)\Adobe\Adobe Flash CS5\Flash.exe"
goto 0

 

关闭程序.bat

@echo off
title Kill Software
color 2F

:0
taskkill /f /im Photoshop.exe
ping -n 8 127.0.0.1>%temp%\1.tmp
taskkill /f /im Dreamweaver.exe
ping -n 8 127.0.0.1>%temp%\1.tmp
taskkill /f /im Flash.exe
ping -n 8 127.0.0.1>%temp%\1.tmp
goto 0

 

 

本文出自 “运维菜鸟.log” 博客,谢绝转载!

posted @ 2015-09-01 16:10  进壹  阅读(1183)  评论(0编辑  收藏  举报