首页 > 解决方案 > 启动可执行文件,然后立即暂停它

问题描述

我想询问有关使用 c# 暂停进程的问题。我创建了从用户获取路径(到 exe)的应用程序,但是我需要执行该应用程序,然后尽快将其挂起。

例子:

Try
{
   //run the exe 
   //suspend the process
}
catch
{
   // if it fails, then kill the process.
}

另外,它可以等待例如 0.3 秒,然后再次暂停该过程。

标签: c#process

解决方案


推荐阅读