dcross
Posts: 9
Joined: Mon Jun 15, 2009 10:38 pm

Setting Service Start Type to "Automatic (Delayed Start)"

I have an AI project (Version 8.0.2) that installs a service which relies on SQL Server having started before it can start successfully. I have found that manually changing the Service startup property to "Automatic (Delayed Start)" on Windows 2008 server seems to resolve my issues (allowing SQL Server to startup first). Unfortunately I cannot seem to get the installer to default the service to this Start Type. AI offers me three options for Start Type in the Service Properties form:
Automatic
The service will start when starting the operating system.
On Demand
The service will start only when the user starts it manually.
Disabled
The service can no longer be started. It is possible to be enabled.
Is it possible to have AI install the service with the "Automatic (Delayed Start)" mode?
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Setting Service Start Type to "Automatic (Delayed Start)

Hello,

Unfortunately, the available settings you mentioned are all that Windows Installer currently supports:
http://msdn.microsoft.com/en-us/library ... 85%29.aspx

You can however try to implement this functionality by developing your own custom action.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
dcross
Posts: 9
Joined: Mon Jun 15, 2009 10:38 pm

Re: Setting Service Start Type to "Automatic (Delayed Start)

Thank you Mihai;
I found that I was able to achieve the desired result by adding a registry key - this seemed easier than a custom action. I do not know if there is potentially a downside to this approach, but it seems to work.

Code: Select all

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\<service-name>]
"DelayedAutoStart"=dword:00000001
The Service does not indicate the Startup Type as being "Automatic (Delayed Start)" until the machine reboots, but this is not a problem.

Return to “Common Problems”