S
Sergei Shelukhin
Hi. I am writing an app that updates a certain windows service that is
had previously installed.
It stops the service, rewrites the file, and starts it again.
On some machines, however, even though the service is stopped, I am
getting "being used by another process" error. I wonder if there's any
pre-made class in .NET framework or some third-party component that
would close the handle to this file from whichever process, or kill
offending process altogether; e.g. unlock the file no matter what?
I am contemplating using WinApi to accomplish this, but I think it
might be reinventing the wheel...
had previously installed.
It stops the service, rewrites the file, and starts it again.
On some machines, however, even though the service is stopped, I am
getting "being used by another process" error. I wonder if there's any
pre-made class in .NET framework or some third-party component that
would close the handle to this file from whichever process, or kill
offending process altogether; e.g. unlock the file no matter what?
I am contemplating using WinApi to accomplish this, but I think it
might be reinventing the wheel...