To add to what Nick said, here's what I have. It works in WiX 3.5: <ServiceInstall Id="InstallMyService" ... > <util:ServiceConfig ServiceName="MyService" FirstFailureActionType="restart" SecondFailureActionType="restart" ThirdFailureActionType="restart" ResetPeriodInDays="1" RestartServiceDelayInSeconds="60" /> </ServiceInstall>
-Adam On Mon, Dec 17, 2012 at 11:05 AM, Peter Shirtcliffe <pshirtcli...@sdl.com>wrote: > Error 5 is access denied. Are you running the installation as > administrator ? > > -----Original Message----- > From: Marty Offe [mailto:marty.o...@harlandfs.com] > Sent: 17 December 2012 16:44 > To: wix-users@lists.sourceforge.net > Subject: [WiX-users] How do to configure a Windows service to "Restart the > Service" upon failure? > > I am *not* able to get msiexec.exe to set the recovery option of my Windows > service to "Restart the Service". > > Wix 3.6 documentation suggests that I can use ServiceConfigFailureActions > to > accomplish this. > Here is my ServiceInstall element: > <ServiceInstall Id="ServiceInstallID" > Name="LPDS Service" > DisplayName="LaserPro Document Service" > Description="Allows LaserPro Document Service to be > used as a web service." > Interactive="no" > ErrorControl="ignore" > Start="auto" > Type="ownProcess" > Vital="no" > > <ServiceConfig FailureActionsWhen="failedToStopOrReturnedError" > OnInstall="yes" OnReinstall="yes" OnUninstall="yes" /> > <ServiceConfigFailureActions OnInstall="yes" OnReinstall="yes" > OnUninstall="yes" ResetPeriod="86400" Command="c:\foo.bat"> > <Failure Action="runCommand" Delay="1000"/> > <Failure Action="restartService" Delay="2000"/> > </ServiceConfigFailureActions> > </ServiceInstall> > > > I am using msiexec.exe version V 5.0.7601.17514 Error from installation log > file: > > MSI (s) (A0:F8) [08:21:16:136]: Executing op: CacheSizeFlush(,) MSI (s) > (A0:F8) [08:21:16:136]: Executing op: > ActionStart(Name=InstallServices,Description=Installing new > services,Template=Service: [2]) MSI (s) (A0:F8) [08:21:16:142]: Executing > op: > ProgressTotal(Total=1,Type=1,ByteEquivalent=1300000) > MSI (s) (A0:F8) [08:21:16:143]: Executing op: ServiceInstall(Name=LPDS > Service,DisplayName=LaserPro Document > > Service,ImagePath=C:\LPDS\CFI\Service.exe,ServiceType=32,StartType=2,ErrorCon > trol=32768,,Dependencies=[~],,,Password=**********,Description=Allows > LaserPro Document Service to be used as a web service.,,) MSI (s) (A0:F8) > [08:21:16:771]: Executing op: ActionStart(Name=MsiConfigureServices,,) > MSI (s) (A0:F8) [08:21:16:771]: Executing op: > ProgressTotal(Total=1,Type=1,ByteEquivalent=1300000) > MSI (s) (A0:F8) [08:21:16:771]: Executing op: ServiceConfigure(,Name=LPDS > Service,Event=5,ConfigType=4,Argument=1) > MSI (s) (A0:F8) [08:21:16:771]: Changing configuration of service LPDS > Service. > MSI (s) (A0:F8) [08:21:16:781]: Changed configuration of service LPDS > Service > with ConfigType SERVICE_CONFIG_FAILURE_ACTIONS_FLAG > MSI (s) (A0:F8) [08:21:16:781]: Done changing configuration of service LPDS > Service MSI (s) (A0:F8) [08:21:16:781]: Executing op: > ProgressTotal(Total=1,Type=1,ByteEquivalent=1300000) > MSI (s) (A0:F8) [08:21:16:781]: Executing op: > ServiceConfigureFailureAction(,Name=LPDS > Service,Event=1,,RebootMessage=[~],Command=[~],Actions=1,DelayActions=9000) > MSI (s) (A0:F8) [08:21:16:781]: Changing configuration of failure action > for > service LPDS Service. > MSI (s) (A0:F8) [08:21:16:782]: Warning: ResetPeriod is <blank>. Trying to > change current configuration of failure action for service LPDS Service. > Replacing with default argument INFINITE MSI (s) (A0:F8) [08:21:16:782]: > Error: 5. Failed to change current configuration of failure action for > service LPDS Service MSI (s) (A0:F8) [08:21:16:782]: Failed to change > configuration of failure action for service LPDS Service MSI (s) (A0:F8) > [08:21:16:782]: Note: 1: 2205 2: 3: Error MSI (s) (A0:F8) [08:21:16:782]: > Note: 1: 2228 2: 3: Error 4: SELECT `Message` FROM `Error` WHERE `Error` = > 1939 MSI (c) (D8:DC) [08:21:16:785]: Font created. Charset: Req=0, Ret=0, > Font: Req=MS Shell Dlg, Ret=MS Shell Dlg > > Error 1939. Service 'LaserPro Document Service' (LPDS Service) 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. > MSI (s) (A0:F8) [08:21:46:995]: Note: 1: 2205 2: 3: Error MSI (s) (A0:F8) > [08:21:46:995]: Note: 1: 2228 2: 3: Error 4: SELECT `Message` FROM `Error` > WHERE `Error` = 1709 MSI (s) (A0:F8) [08:21:46:995]: Product: LaserPro > Document Service -- Error 1939. Service 'LaserPro Document Service' (LPDS > Service) 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. > > > > Here are the rows that WIX generates in the MsiServiceConfig and > MsiSErviceConfigFailureActions tables: > > MsiServiceConfig Name Event ConfigType > Argument Component_ > LPDS_Service.FA LPDS Service 7 4 > 1 LPDSService.exe > > > MsiServiceConfigFailureActions table contents: > MsiServiceConfigFailureActions Name Event > ResetPeriod RebootMessage Command > Actions > DelayActions Component_ > LPDS_Service LPDS > Service > 7 86400 [~] > c:\foo.bat 1[~]3 3000[~]3000 > LPDSService.exe > > > > > Marty Offe > > > > ----------------------------------------------------------------------------- > - > LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial > Remotely > access PCs and mobile devices and provide instant support Improve your > efficiency, and focus on delivering more value-add services Discover what > IT > Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d > _______________________________________________ > WiX-users mailing list > WiX-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wix-users > SDL PLC confidential, all rights reserved. > If you are not the intended recipient of this mail SDL requests and > requires that you delete it without acting upon or copying any of its > contents, and we further request that you advise us. > SDL PLC is a public limited company registered in England and Wales. > Registered number: 02675207. > Registered address: Globe House, Clivemont Road, Maidenhead, Berkshire SL6 > 7DY, UK. > > > > ------------------------------------------------------------------------------ > LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial > Remotely access PCs and mobile devices and provide instant support > Improve your efficiency, and focus on delivering more value-add services > Discover what IT Professionals Know. Rescue delivers > http://p.sf.net/sfu/logmein_12329d2d > _______________________________________________ > WiX-users mailing list > WiX-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wix-users > ------------------------------------------------------------------------------ LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users