PDA

View Full Version : Control startup type of a service



nitsev
01-20-2005, 10:35 AM
I have created a component with property .NET Installer Class set to Yes. This installs the service in the Services view under Administratives tools, but the service startup type is Manual and it does not start. I can change the user by passing parameters to the service in the .NET Installer Class Arguments, but I cannot use arguments to change startup type or start the service.

1. How can I set the startup type to automatic.

2. How can I start the service without rebooting the machine.

Thanks

PatrickJ
01-22-2005, 05:40 AM
Install Service
In the Installation Designer go to Components. Select the component to be installed as a service. Expand the node and expand advanced settings too. Then you will find the Install Services Node. Select it and then at the right hand right click the NT Services Option. In the property grid at right then select the desired features.

Control Service
Start like above. Select the Control NT Services node. Right click Control NT Services at the right side, and add a new item. Then you can choose the desired options.

Hope that helps.
Patrick

nitsev
01-24-2005, 02:43 AM
PatrickJ

I believe this is intended for Win32 services, not services written in .net, but I might be mistaken. Setting the ".NET Installer Class" to Yes is what causes InstallShield to add it as a service. I do not need to add the service executable under the components Advanced Settings/Install NT Services for that to work. For this option to work I would have to add the file under Install NT Services and I doubt if that is the right way to go.


Install Service
In the Installation Designer go to Components. Select the component to be installed as a service. Expand the node and expand advanced settings too. Then you will find the Install Services Node. Select it and then at the right hand right click the NT Services Option. In the property grid at right then select the desired features.

Control Service
Start like above. Select the Control NT Services node. Right click Control NT Services at the right side, and add a new item. Then you can choose the desired options.

Hope that helps.
Patrick

PatrickJ
01-24-2005, 07:35 AM
IMHO, the .NET Installer Class Property has nothing to do with services.

I installed a .NET Component as I have described it. The Service is installed an started and the startmode is set to automatic as I wanted.

On Uninstall, the service is correctly stopped and uninstalled.