cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Matronix
Level 6

How to configure a service during install?

How do you configure a service that is already on the machine? I know if you are installing a new service you can configure it with the Install NT Service part of the component.
Labels (1)
0 Kudos
(5) Replies
Marwan
Level 7

Pre 2010SP1, you can just use the Control NT Service node to start/stop/delete an installed sevice. You will have to use the Win32 APIs via a Custom Action or some script to configure an already installed service.
In 2010 SP1 / MSI5, you can use the new "Configure Settings" category under the new Services sub-node of a component to set many service options for an existing service.
0 Kudos
Matronix
Level 6

Thanks for that answer. I just called support a few minutes before posting this and they gave me no mention of a SP released and this ability in there. Downloading it now and will test it out.
0 Kudos
Matronix
Level 6

For now MSI5 machines, like 2003 and 2008 (non-R2), is there anything built into IS to configure services?
0 Kudos
Marwan
Level 7

You can use InstallScript. Look up ServiceInitParams and ServiceStartService for more info.
0 Kudos
schmoli
Level 6

I don't know if it would be considered antiquated, but I still just use sc.exe launched from custom actions.. For example, my application uses WCF services so I must make sure the NetTCPPortSharing service is set to automatic if it's not currently, so I do something like this:

sc.exe config nettcpportsharing start= auto

also sometimes I modify the identity of services:

sc.exe config ServiceName obj= [UserName] password= [Password]

I personally find it much easier, plus I associate the custom actions with feature states instead of associating to a component that is just loosely tied to what I'm actually doing.
0 Kudos