如何设置一个进程超时在Windows 7下? [英] How to set a timeout for a process under Windows 7?
本文介绍了如何设置一个进程超时在Windows 7下?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想先从Windows批处理文件的程序。但是,程序应该有一定的超时值后停止。例如:运行程序60秒,60秒后停止
。在Linux下,有这个漂亮的暂停
命令做我想做的。 Windows还具有暂停
命令,但它只是暂停命令,推迟执行。有没有在Windows下别的东西这样做呢?
设置:Windows 7中,64位专业版
解决方案
启动yourprogram.exe
超时/吨60
TASKKILL / IM yourprogram.exe /˚F
I would like to start a program with a windows batch file. But the program should stop after a certain timeout value. For example: Run the program 60 seconds and stop it after 60 seconds.
Under Linux, there is this nice timeout
command to do what I want. Windows has also a timeout
command, but its just to pause a command, to delay its execution. Is there something else under Windows to do so ?
Setup: Windows 7, 64 Bit, Professional
解决方案
start yourprogram.exe
timeout /t 60
taskkill /im yourprogram.exe /f
这篇关于如何设置一个进程超时在Windows 7下?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文