By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,771 Members | 1,709 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,771 IT Pros & Developers. It's quick & easy.

unlock file, close handle, kill process that holds it?

P: n/a
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...
Dec 11 '07 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.