PDA

View Full Version : ServiceAddservice



Lou Elston
11-03-2003, 02:50 PM
I need to set\change the start type on a bunch of services. I am using Devstudio9, Installscript.

While the help mentions that there are functions to do these things, there are no examples.

While there is some information in this forum, there is not enough for me fill in all the missing pieces.

Please pick a service, any service, and give me an example of what to set and what to call. Use ClipBook or some simple service. I am testing using VMware, (virtual machines), so I cannot screw up anything, as I can easily restore.

I know that a call to serviceinitparms is need first? When done with my changes to the services, do I have to reset this to the default?

On ServiceAddService, do I need to supply all the paramaters, or can I use",,"to skip them?.

I know that ServiceGetServiceState gets the state of the service, how do I check for the start type?

Thanks for any help

Lou

DevinEllingson
11-04-2003, 03:31 PM
Lou Elston,

Unfortunately currently I don't know of any specific service examples.

I would suggest reviewing the "Services" topic in MSDN or the Platform SDK, this provides general information about services, how they work, how to start them etc.

Devin Ellingson
InstallShield Software Corporation

DevinEllingson
11-04-2003, 04:05 PM
Lou Elston,

Here is a sample that might help you:

http://www.installshield.com/downloads/release.asp?xmlUse=n&releaseid=1235&target=%2Fdownloads%2Fsampleprojects%2FPro701%2DChangeServiceTypeSample%2Ezip

Devin Ellingson
InstallShield Software Corporation

Lou Elston
11-06-2003, 08:04 AM
Devin

Thank you for taking the time to assist me. I did find what you pointed me to usefull, and, I will be using it. I did also find a smaller version of code that was specific to changing the service start type, on the Installsite.org site, 'setservice.zip'.

I used to know this stuff, and had to remember the hard way that the service name that you see when you go into Services, is not actually the service name that you use when actually trying to modify that service. You get the real name to use by clicking on the properties of that service, and using the name that shows on the top of the properties.

Thanks

Lou Elston