Announcement

Collapse
No announcement yet.

Problems uninstalling service

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Problems uninstalling service

    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

  • #2
    Re: Problems uninstalling service

    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.
    MSI Factory The Next Generation Intelligent Setup Builder

    Comment


    • #3
      Re: Problems uninstalling service

      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 !

      Comment


      • #4
        Re: Problems uninstalling service

        Hi,

        No problem, I'm glad to hear that you've got you uninstall working.

        mark.
        MSI Factory The Next Generation Intelligent Setup Builder

        Comment

        Working...
        X