Page 1 of 1

How do I prevent a service from changing its Startup option

Posted: Tue Dec 06, 2011 11:26 am
by Nbtrble
We are using InstallAware 2012 and during part of our installation we install and configure a service app. When we make new versions of our product we change the version information and rebuild the installation. If a customer changes our service from Automatic to Manual when then get a new version of our software the install changes it back to Automatic.

I would like to modify my install so that if it already exists that it doesn't modify the startup option and leaves it as it is currently set.

Now something that just came to my mind is maybe we should be creating patches to our product for every version we release. (Our product is never really "completed" we are always adding to it and comming out with new versions).

What is the best way to solve this?

Thanks in advance,
Rodger Van Kirk

Re: How do I prevent a service from changing its Startup opt

Posted: Tue Dec 06, 2011 4:04 pm
by bokkie
Rodger, I'm replying without testing my proposed solution but perhaps you could look at it from this angle: check the registry to see if you have the service already installed and set a variable to convey that status. Then, when you come to install the service use an "if" statement on the variable and have a different startup option as needed. I'm reasonably sure you can get the current startup status from the registry as well. If I get time tomorrow I'll try it as I'm at home and quoting how I think it could be done which is not the same as saying that's how it is done.