It's possible that it could be a permissions issue, but it doesn't seem to be. After changing the local security policy to give the Administrator account the "log on as a service" account, the same behavior remained. I didn't see any other privileges that seemed to suggest that they'd specifically affect service configuration, either.
When logged on as Administrator, I am able to change the failure recovery settings of the service with sc.exe failure. As far as I can tell, the MSI package runs with the privileges of the user who installs it. So, I would think it would work the same as using sc.exe. I don't know if the Wix Util extension's ServiceConfig element works with a different set of permissions, but using it I am able to set all three failure actions -- "restart", "reboot" and "runCommand". So, it seems to be an issue isolated to MSI 5.0's ServiceConfigFailureActions element, but only when using either the "restart" or "reboot" actions. And even with all of the permissions I can think to give, those actions don't complete successfully. Nick Wilson, Phil wrote: > > I'm just speculating here, but permissions might be an issue because > administrators don't always have every right automatically assigned and > enabled. Having the "Log on as a service" privilege might be relevant if > you're changing service configurations (admins don't get that by default > IIRC). It's interesting that the failing ones would cause a reboot, and > that might also be a missing right like SE_SHUTDOWN_NAME. > > Phil Wilson > > -----Original Message----- > From: Nick Ramirez [mailto:nickra...@hotmail.com] > Sent: Wednesday, January 27, 2010 12:30 PM > To: wix-users@lists.sourceforge.net > Subject: Re: [WiX-users] MSI 5.0 ServiceConfigFailureActions fails during > InstallExecuteSequence > > > I've found, as another post has pointed out, that you CAN use the failure > action "runCommand". This works fine. However, using either > "restartComputer" or "restartService" gives the permission error. > > Using processmon, > http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx, I can see > the > Registry keys being accessed and written to at the time the MSI fails. > Interestingly, when it fails, it doesn't appear that the MSI is writing > the > service failure values like it should. > > I'm running this as an Administrator and other values are being written to > that key (service name, description, etc.). So, I don't think there's > something wrong with my permissions or the way the MSI package is written. > I > think there might be something genuinely wrong with the way MSI 5.0 > handles > writing failure recovery settings for Windows services. > > Here are the Registry actions as captured by processmon: > > This worked (when I set the failure action to "runCommand" -- it's > supposed > to run a script at C:\script.cmd. > > -------------------------------------- > RegOpenKey HKLM\System\CurrentControlSet\services\testsvc > SUCCESS > Desired Access: Read > RegQueryValue > HKLM\System\CurrentControlSet\services\testsvc\FailureActions > NAME NOT FOUND Length: 268 > RegQueryValue HKLM\System\CurrentControlSet\services\testsvc\RebootMessage > > NAME NOT FOUND Length: 268 > RegQueryValue > HKLM\System\CurrentControlSet\services\testsvc\FailureCommand > NAME NOT FOUND Length: 268 > RegCloseKey HKLM\System\CurrentControlSet\services\testsvc > SUCCESS > RegOpenKey HKLM\System\CurrentControlSet\services\testsvc > SUCCESS > Desired Access: Read/Write > RegQueryValue HKLM\System\CurrentControlSet\services\testsvc\ImagePath > > SUCCESS Type: REG_EXPAND_SZ, Length: 122, Data: "C:\Program > Files\MySoftware\WindowsService1.exe" > RegQueryValue HKLM\System\CurrentControlSet\services\testsvc\RebootMessage > > NAME NOT FOUND Length: 268 > RegDeleteValue > HKLM\System\CurrentControlSet\services\testsvc\RebootMessage > NAME NOT FOUND > RegQueryValue > HKLM\System\CurrentControlSet\services\testsvc\FailureCommand > NAME NOT FOUND Length: 268 > RegSetValue HKLM\System\CurrentControlSet\services\testsvc\FailureCommand > > SUCCESS Type: REG_SZ, Length: 22, Data: script.cmd > RegSetValue HKLM\System\CurrentControlSet\services\testsvc\FailureActions > > SUCCESS Type: REG_BINARY, Length: 28, Data: 3C 00 00 00 01 00 > 00 00 01 00 > 00 00 01 00 00 00 > RegFlushKey HKLM\System\CurrentControlSet\services\testsvc SUCCESS > RegCloseKey HKLM\System\CurrentControlSet\services\testsvc SUCCESS > ------------------------------------ > > > However, this, where I tried to restart the service at failure, did not > work: > > ------------------------------------- > RegOpenKey HKLM\System\CurrentControlSet\services\testsvc > SUCCESS > Desired Access: Read > RegQueryValue > HKLM\System\CurrentControlSet\services\testsvc\FailureActions > NAME NOT FOUND Length: 268 > RegQueryValue HKLM\System\CurrentControlSet\services\testsvc\RebootMessage > > NAME NOT FOUND Length: 268 > RegQueryValue > HKLM\System\CurrentControlSet\services\testsvc\FailureCommand > NAME NOT FOUND Length: 268 > RegCloseKey HKLM\System\CurrentControlSet\services\testsvc > SUCCESS > RegOpenKey HKLM\System\CurrentControlSet\services\testsvc > SUCCESS > Desired Access: Read > RegQueryValue > HKLM\System\CurrentControlSet\services\testsvc\FailureActions > NAME NOT FOUND Length: 268 > RegQueryValue HKLM\System\CurrentControlSet\services\testsvc\RebootMessage > > NAME NOT FOUND Length: 268 > RegQueryValue > HKLM\System\CurrentControlSet\services\testsvc\FailureCommand > NAME NOT FOUND Length: 268 > RegCloseKey HKLM\System\CurrentControlSet\services\testsvc > SUCCESS > RegOpenKey HKLM\System\CurrentControlSet\services\testsvc > SUCCESS > Desired Access: Read/Write > RegFlushKey HKLM\System\CurrentControlSet\services\testsvc > SUCCESS > RegCloseKey HKLM\System\CurrentControlSet\services\testsvc > SUCCESS > ------------------------------------------------------ > > Nick Ramirez > -- > View this message in context: > http://n2.nabble.com/MSI-5-0-ServiceConfigFailureActions-fails-during-InstallExecuteSequence-tp4452709p4469530.html > Sent from the wix-users mailing list archive at Nabble.com. > > ------------------------------------------------------------------------------ > The Planet: dedicated and managed hosting, cloud storage, colocation > Stay online with enterprise data centers and the best network in the > business > Choose flexible plans and management services without long-term contracts > Personal 24x7 support from experience hosting pros just a phone call away. > http://p.sf.net/sfu/theplanet-com > _______________________________________________ > WiX-users mailing list > WiX-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wix-users > > > > *** Confidentiality Notice: This e-mail, including any associated or > attached files, is intended solely for the individual or entity to which > it is addressed. This e-mail is confidential and may well also be legally > privileged. If you have received it in error, you are on notice of its > status. Please notify the sender immediately by reply e-mail and then > delete this message from your system. Please do not copy it or use it for > any purposes, or disclose its contents to any other person. This email > comes from a division of the Invensys Group, owned by Invensys plc, which > is a company registered in England and Wales with its registered office at > Portland House, Bressenden Place, London, SW1E 5BF (Registered number > 166023). For a list of European legal entities within the Invensys Group, > please go to > http://www.invensys.com/legal/default.asp?top_nav_id=77&nav_id=80&prev_id=77. > You may contact Invensys plc on +44 (0)20 7821 3848 or e-mail > inet.hqhelpd...@invensys.com. This e-mail and any attachments thereto may > be subject to the terms of any agreements between Invensys (and/or its > subsidiaries and affiliates) and the recipient (and/or its subsidiaries > and affiliates). > > > > ------------------------------------------------------------------------------ > The Planet: dedicated and managed hosting, cloud storage, colocation > Stay online with enterprise data centers and the best network in the > business > Choose flexible plans and management services without long-term contracts > Personal 24x7 support from experience hosting pros just a phone call away. > http://p.sf.net/sfu/theplanet-com > _______________________________________________ > WiX-users mailing list > WiX-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wix-users > > -- View this message in context: http://n2.nabble.com/MSI-5-0-ServiceConfigFailureActions-fails-during-InstallExecuteSequence-tp4452709p4474745.html Sent from the wix-users mailing list archive at Nabble.com. ------------------------------------------------------------------------------ The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users