PDA

View Full Version : Error 1939 when using <util:ServiceConfig> on Windows Server 2008 R2



hackaway
02-15-2011, 07:31 AM
<Wix & IS2011 mixed installer>

I have a C# Windows Service project. I have a Install Shield 2011 Express project for installing this Windows Service. Because IS2011 do not directly support such installations I have made a Merge Module in Wix which I install via the IS2011 project.
The final IS2011 installer has been working well (Windows 2003, Windows 2008 R2, Windows XP).

I have since realized I need to add dependencies and recovery options for this Windows service. This I did by adding the elements :
- ServiceDependency
- ServiceConfig
- ServiceConfigFailureActions
- util:ServiceConfig

I tried installing on a Windows Server 2003 32-bit and it worked OK. All properties were set for the service as expected.
Installing on a 64-bit Windows Server 2008 R2 I get this error message:
"Error 1939. Service 'xyz' (xyz) could not be configured. This could be a problem with the package or your permissions. Verify that you have sufficient privileges to configure system services."

This is the portion of the XML file concerning the Windows Service:


<ServiceInstall Id="installWS" Name="xyz" DisplayName="xyz" Description="abc" Start="auto" Type ="ownProcess" ErrorControl ="normal" Vital="yes">
<ServiceConfig DelayedAutoStart="yes" OnInstall="yes"/>
<util:ServiceConfig FirstFailureActionType="restart" SecondFailureActionType="restart" ThirdFailureActionType="restart" RestartServiceDelayInSeconds="60" />
<ServiceConfigFailureActions OnInstall="yes">
<Failure Action="1" Delay="20000"/>
</ServiceConfigFailureActions>
<ServiceDependency Id="MSSQL$SQLEXPRESS"/>
</ServiceInstall>
<ServiceControl Id="controlWS" Name="xyz" Remove="both" Stop ="both" Start="install" Wait ="yes"/>



By blocking/removing these elements the installation works fine on the Windows Server 2008 R2.
- ServiceConfig
- ServiceConfigFailureActions
- util:ServiceConfig

After installation is done, I can then open up the Windows service "xyz" and manually set the recovery for the service to "restart" without any error messages.


Any help greatly appreciated. Got no response from Wix user list, hopefully someone here can help.

Christopher Painter
02-15-2011, 02:16 PM
I'd stick to the WiX-Users list. I must have missed that message so I'll see if I can find it and reply.

BTW, it looks like you did get a reply:

http://permalink.gmane.org/gmane.comp.windows.devel.wix.user/53618

hackaway
02-15-2011, 03:16 PM
I'd stick to the WiX-Users list. I must have missed that message so I'll see if I can find it and reply.

BTW, it looks like you did get a reply:

http://permalink.gmane.org/gmane.comp.windows.devel.wix.user/53618
Yes I found the reply today after posting here. I will try and find the differences between the two OS in this regard.