WMIPRVSE.exe locks a file

A

Aviator

Dear All,

I am having a Service Wrapper exe written using C++ (VS 6 Env) utilizing
NTService in one of my products. Its job is to register and deregister s
batch file as service as and when required. I am having two machine both
running Windows 2003 Enterprise edition. Let’s assume the machines as A and B.

Now this is my question. When I install my service, everything works fine;
it starts, stops and functionality is as expected. But when I am removing the
service and after that, deleting this exe file (which was written as a
service wrapper), it is getting deleted in Machine A and not in machine B. If
I use Process Explorer and search for a handle it points to wmiprvse.exe in B.
After restarting or after killing wmiprvse.exe, I am able to delete that file.

I just want to know whether this is an expected behavior and the exact patch
number which changed the exe after SP2 (since timestamp is different).

Some details regarding the machines.
Machine A:
SP2 installed.
Automatic Updates NOT enabled.
Wmiprvse.exe has timestamp 2/17/2007 4:09 AM and size 203 KB

Machine B:
SP2 installed
Automatic Updates Enabled.
Wmiprvse.exe has timestamp 02/17/2007 7:34 pm and size 203 KB


Just a Gist of what am doing with my product:-
A Wrapper, say ServiceWrapper.exe, written using NTService.
A batch file ABC.bat
ServiceWrapper.exe registers ABC.bat as service and then it can be
started/stopped using SCM
When removing the service, this ServiceWrapper stops the service if its
running, attempts to close open service handles and then delete service. The
entry is getting removed from SCM. I can see that. But this is part of
uninstall procedure, so after doing service removal, if I try to delete this
ServiceWrapper.exe it is throwing error in one of the machines explained
above.

Also, this is not happening is any XP machines!

Please help and guide me in right direction!
Thanks a lot in advance!

Regards
Prasanna Ram
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top