关与DOS的问题
来源:百度知道 编辑:UC知道 时间:2024/07/07 18:31:50
我想在特定的时间运行或者关闭某个程序.请问在DOS操作中怎么才能做到.
要明确的命令语句
要明确的命令语句
定时可以用 at 命令
具体可以在命令行中输入 at /? 查看详细说明
比如是 at 10:00 shutdown /s /f /t 0 就是在10点钟关机
运行程序可以用 start 命令
具体可以在命令行中输入 start /? 查看详细说明
比如 start e:\tool\clean.exe 就启动了clean.exe
在批处理中,也可省略此命令,直接输入"e:\tool\clean.exe"即可.
关闭程序可以用 taskkill 命令
具体可以在命令行中输入 taskkill /? 查看详细说明
比如是 taskkill /im qq.exe /f /t 就是关闭所有的QQ程序
在10点钟运行clean.exe这个程序。
at 10:00 e:\tool\clean.exe
在11点种关闭clean.exe这个程序。
at 11:00 taskkill /im clean.exe /f /t
这个一般是在别人电脑里搞破坏时才用。。。。
二句就行了
在8点钟运行qq.exe这个程序。
at 8:00 e:\qq\qq.exe
在11点种关闭cqq.exe这个程序。
at 11:00 taskkill /im qq.exe /f /t