Process.kill() denied in Windows 7 32bits even with Administrator privileges

后端 未结 4 1420
清歌不尽
清歌不尽 2020-12-20 20:46

Hello every one.

I\'m faced with a weird problem. My application has a simple method that in case IE enters a state were it gets unresponsive this m

4条回答
  •  一个人的身影
    2020-12-20 21:10

    Given that you say you always possess administrative privileges when you attempt to call this method, the following would explain why you have intermittent issues:

    System.Diagnostics.Process.Kill:

    If the call to the Kill method is made while the process is currently terminating, a Win32Exception is thrown for Access Denied.

    If you've quickly hit 'delete' + 'OK' twice, on an entry in Process-Explorer, you'll know what I'm talking about.

提交回复
热议问题