change service to manual before upgrade

Got a problem you cannot solve? Try here.

change service to manual before upgrade

Postby tzachk » Wed Jul 18, 2012 12:16 am

Hi all,

During upgrade or uninstall of my product I need to reboot the machine.
Before rebooting, I need to change the service to manual as to prevent it from starting after the reboot.

Any help on how to achieve this is appreciated.

Regards,
Tzach
tzachk
 
Posts: 86
Joined: Wed Jul 18, 2012 12:14 am

Re: change service to manual before upgrade

Postby FrancescoT » Wed Jul 18, 2012 8:38 am

Dear Tzach,

to set the Start Type of a service you must set the appropriate value for "Start" key under the Service registry key:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\<SERVICENAME>

This can be easly done using the InstallAware comand "Write Registry Key".
If you use the command after Apply Install in your script, you must enable the IA Native Engine otherwise the command will fail.

Example:
Code: Select all
Set Variable NATIVE_ENGINE to TRUE
Write Registry Key HKLM\\,
Set Variable NATIVE_ENGINE to TRUE


For the required value to use with the "Start" key, please refer to MSDN documentation.
Alternatively set as Manual the service using Service manager in Control Panel and then with REGEDIT check which is the required value.

Regards
Francesco Toscano
InstallAware Software Support

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
FrancescoT
Site Admin
 
Posts: 1811
Joined: Sun Aug 22, 2010 4:28 am

Re: change service to manual before upgrade

Postby tzachk » Wed Jul 18, 2012 11:28 am

Hi Francesco,

Thanks for the prompt reply.
It seems I mis-explained myself.

I know how to change a service to start manually. What I don't know is where to place the instructions in the MSIcode script.
I'm having a hard time understanding the flow of operations, like:
- Start of install
- Before reboot
- After reboot
- After installer complets
etc.

Regards,
Tzach.
tzachk
 
Posts: 86
Joined: Wed Jul 18, 2012 12:14 am

Re: change service to manual before upgrade

Postby FrancescoT » Wed Jul 18, 2012 11:37 am

Dear Tzach,

if this have to be done during application upgrade and supposing that the service is installed on your target machine, do that just after your update operation and before system reboot command.

If you post your specific script code snippet, I will add the code for you.

Regards
Francesco Toscano
InstallAware Software Support

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
FrancescoT
Site Admin
 
Posts: 1811
Joined: Sun Aug 22, 2010 4:28 am


Return to Technical Support

Who is online

Users browsing this forum: Exabot [Bot], Google [Bot] and 3 guests