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

Comments

Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Answers

0
personally i would go down the custom action road my friend.
Answered 02/24/2006 by: misk
Orange Senior Belt

Please log in to comment
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.
Answered 02/24/2006 by: sikkert
Orange Senior Belt

Please log in to comment
0
@sikkert - I couldn't agree more! [:)]
Answered 02/24/2006 by: brenthunter2005
Fifth Degree Brown Belt

Please log in to comment
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.
Answered 02/24/2006 by: rj01
Senior Yellow Belt

Please log in to comment
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?
Answered 02/25/2006 by: brenthunter2005
Fifth Degree Brown Belt

Please log in to comment
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.
Answered 02/25/2006 by: sikkert
Orange Senior Belt

Please log in to comment
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
Answered 02/28/2006 by: rj01
Senior Yellow Belt

Please log in to comment
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'.
Answered 02/28/2006 by: brenthunter2005
Fifth Degree Brown Belt

Please log in to comment
0
Oh, I misunderstood the Wise help section about controlling services.

Thank you for your help it works now
Answered 02/28/2006 by: rj01
Senior Yellow Belt

Please log in to comment
Answer this question or Comment on this question for clarity