View Full Version : Problems uninstalling service
Azuriel
06-05-2002, 03:22 AM
In my unstallation procedure, I must stop a service and delete it, but the unstallation is too fast and don't wait the Stop & Delete of the service and of course _cannot_ erase the service files at the end.
How can I wait for the end of the service Stop & Delete before continuing ? Is there a timer of a way to known when my service is stopped ?
Thanks by advance
Hi,
What you might try is using a While loop to keep looping until your service has stopped. So maybe something like this:
%ServiceStatus% = "RUNNING"
Stop Service (<<SERVICENAME>>)
While (%ServiceStatus% <> "STOPPED")
Stop Service (<<SERVICENAME>>)
%ServiceStatus% = Query Service(<<SERVICENAME>>)
END WHILE
Delete Service (<<SERVICENAME>>)
You might not need the second "Stop Service" action but I don't think it will hurt. Give the above example a try and let me know what the results are. You will put the actions on the Before Tab of your uninstall, and (of course) the action syntax will not look exactly like the above. If you run into any problems let me know.
mark.
Azuriel
06-07-2002, 07:42 AM
Hi Mark !
I had already thought of the solution that you indicated to me but if the service cannot be killed for a mysterious reason, I fall in a infinite loop.
I found another solution.
I made a tiny program in delphi which wait for the end of the service uninstallation but quit before a laps of time anyway and put it after the uninstallation of my service in SF.
Thanks for your help !
Hi,
No problem, I'm glad to hear that you've got you uninstall working.
mark.
Powered by vBulletin™ Version 4.0.6 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.