Killing processes with PSUTIL

后端 未结 5 1464
陌清茗
陌清茗 2021-01-12 07:58

I\'m looking to write some code that will kill off a process based on it\'s name and who owns it. This works fine on Windows XP but when I come to run the same code on Windo

5条回答
  •  借酒劲吻你
    2021-01-12 08:24

    If you don't have the privilege to kill a process with PSUTIL, you're not going to have it with anything else. The first thing that comes to mind is, obviously, UAC, which appeared exactly between XP and Windows 7. Which implies that your PSUTIL must run from an elevated prompt, not surprising. Add a manifest to request elevation.

提交回复
热议问题