/build/static/layout/Breadcrumb_cap_w.png

Restart services through Wise?

Does anyone know how to restart a service through Wise? I see in the service page that services can be controlled - start, stop, and delete. I need the print spooler service to stop and then start, but Wise always starts the service first which makes my package bomb as the service is already started. Is there anyway to order the services?

I tried to capture restarting the print spooler but I receive permission rights to registry keys when I execute the msi.

If there is no other way I could always force a reboot, but I was trying to avoid that.

Any help would be appreciated.

Thanks

0 Comments   [ + ] Show comments

Answers (9)

Posted by: sikkert 18 years ago
Orange Senior Belt
1
I just made a simple package (with Wise) that restarted the spooler, and had no problems there. Also, according to the SDK, the stop service SA should always come before the start SA.
Have you validated the package, to make sure that the standard actions run in the correct order? Do you get an error message when your package bombs? Anything in the event viewer?

misk:
personally i would go down the custom action road my friend.

Using a custom action for something that Windows Installer should be able to do by itself is generally a bad idea. Windows Installer have the functionality to start/stop services, so I would try to make that work first.
Posted by: misk 18 years ago
Orange Senior Belt
0
personally i would go down the custom action road my friend.
Posted by: brenthunter2005 18 years ago
Fifth Degree Brown Belt
0
@sikkert - I couldn't agree more! [:)]
Posted by: rj01 18 years ago
Senior Yellow Belt
0
Sikkert,

I receive error 1920: Service failed to start. Verify that you have sufficient privileges to start system services. This is the error when I try to run the msi and it's in the event viewer.

I am using an account with administrative privileges.
Posted by: brenthunter2005 18 years ago
Fifth Degree Brown Belt
0
Hmmm, sounds like you might have something wrong in your ServiceControl table maybe?

Check you Application Event Log for reasons why Windows Installer couldn't start the service. Also, can you can post the details of the ServiceControl table?
Posted by: sikkert 18 years ago
Orange Senior Belt
0
rj01:

I assume you have tested starting/stopping the service manually, just to check that this isn't a general problem?

Have you tried making a new package, that just stops the service and then start it again? If you put a message box or something after the "Stop Services" SA, you can also check that it really has stopped. Just remember to set the message box as a deferred CA.
Posted by: rj01 18 years ago
Senior Yellow Belt
0
Mr B Hunter,

To simplify things I put a stop only in the service page (once I get this working I will add the start option). With the stop service the package installs successfully, but I don’t see where it stopped the service.

Here are the entries for the ServiceControl table
ServiceControl – spoolsv.exe
Name – spoolsv.exe
Event – 2
Arguments – n/a
Wait – n/a
Component - ServiceControl

Can the ServiceControl field have any value?

I am new to Wise and any guidance would be appreciated.

Thanks,
rj01
Posted by: brenthunter2005 18 years ago
Fifth Degree Brown Belt
0
Ahh, I see the problem...

The service name ("Name") needs to be the actual service name, not the executable name.

For example, the actual service name for the Print Spooler service is called 'Spooler'.
Posted by: rj01 18 years ago
Senior Yellow Belt
0
Oh, I misunderstood the Wise help section about controlling services.

Thank you for your help it works now
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ