There is a file that can be used by anything. Is it possible to find all the processes that use this file and chop off, so that they would then forcibly delete it?

  • Can. But you will need non-standard rights to kill a process running not under your account. And even if this process hangs somewhere in a call in kernel mode, it can be problematic. Here's a topic: www.stackoverflow.com/a/469392/10105 - VladD
  • That is, it is possible to find the idea, but there can be problems with “chopping off”. - VladD
  • @VladD, and if I am an admin on the server, then what problems can arise if the process is not a system one? - iluxa1810
  • If you are an admin on the server, there are fewer problems, because you have rights. But again, if the process hangs in a system call that does not return, then you will not kill it until it returns. For example, an application tries to read a network drive, and hangs in the kernel before the timeout on the connection. If you google the "unkillable process", there is a lot there. - VladD
  • If we are talking about administration, it may be easier not to write it yourself, but use the Handle utility and / or Process Explorer from the same place ( this is about it with pictures ). - VladD

0