简体   繁体   中英

Find a process by name and kill it

I have a Qt based updater application that needs to replace a running process with the new file. On Windows, the updater is failing when the process is running.

Is there a way that I can find a process by name eg, Firefox.exe and kill it using Qt?

您可以像这样调用系统:taskkill / f / im firefox.exe

Qt中没有API可以做到这一点,这意味着唯一的方法就是使用平台特定的代码。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM