Killing processes with PSUTIL

后端 未结 5 1509
陌清茗
陌清茗 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:32

    This is just a guess, but maybe UAC is preventing Python from having administrator privileges. Try executing Python as administrator using the "run as administrator" thingy on Win 7 (I don't remember where it is exactly, but it probably involves launching a terminal as administrator, which can be done from the Start Menu, and then executing your Python script from there).

提交回复
热议问题