Thanks Phil. Is there a way to ensure in WXS file, such that the service gets started after all the dependent dlls are installed?
-----Original Message----- From: Wilson, Phil [mailto:phil.wil...@invensys.com] Sent: Wednesday, February 01, 2012 5:11 PM To: General discussion for Windows Installer XML toolset. Subject: Re: [WiX-users] unable to start a service through MSI Service can't start can be a dependency issue. A service that's dependent on Dlls being installed to the GAC or to SxS (C++ runtimes) will fail when MSI starts because StartServices is before these are committed to the system. It will start from Service Control Panel afterwards (if there's no rollback) because now the dependencies are installed. Phil W -----Original Message----- From: Michael Osmond [mailto:mosm...@baytech.com.au] Sent: Wednesday, February 01, 2012 4:46 PM To: General discussion for Windows Installer XML toolset. Subject: Re: [WiX-users] unable to start a service through MSI The error message is pretty generic, the service can't start for almost any reason. We have MSIs that run in full dialog mode so there is a dialog popped when the service fails to start with the error you are seeing in the eventlog, with a retry and cancel options. When you get this dialog go to the Services control panel and manual start the service, you will often get a more meaningful error. If you don't get the dialog with the error, change your MSI so it does not try start the service, and debug the startup when the install is finished Michael -----Original Message----- From: Rajesh Khetan [mailto:rajesh.khe...@microsoft.com] Sent: Thursday, 2 February 2012 10:29 AM To: wix-users@lists.sourceforge.net Subject: [WiX-users] unable to start a service through MSI Hi, I am currently trying to get my service started as a part of MSI install and am unable to do so. In the event viewer, I see the following error: Product: Myservice Cache Service -- Error 1920. Service ' Myservice ' (Myservice) failed to start. Verify that you have sufficient privileges to start system services. However, I am logged in as admin. Also, if I simply install the service and start the service manually, I am able to do that. I appreciate any input to help me figure out what I might be doing wrong or missing. One additional data about my service is: I am trying to install the service under account NT AUTHORITY\NETWORK SERVICE (Property SERVICEACCOUNT = 'NT AUTHORITY\NETWORK SERVICE' below) Thanks a lot for your help. Rajesh PS: Here is a snippet from my WXS file: <Directory Id='TARGETDIR' Name='SourceDir'> <Component Id=' MyserviceCacheComponent' Guid='my guid'> <!-- The files to be installed --> <File Id='Myservice.exe' Name='Myservice.exe' DiskId='1' Source='$(var.INETROOT)\target\$(var.BUILDTYPE)\$(var.BUILDTARGET)\Myservice.exe' /> <File Id='Myservice.pdb' Name='Myservice.pdb' DiskId='1' Source='$(var.INETROOT)\target\$(var.BUILDTYPE)\$(var.BUILDTARGET)\Myservice.pdb' /> <File Id='MyservicePf.dll' Name='MyservicePf.dll' SelfRegCost='1' DiskId='1' Source='$(var.INETROOT)\target\$(var.BUILDTYPE)\$(var.BUILDTARGET)\MyservicePf.dll' /> <File Id='MyservicePf.pdb' Name='MyservicePf.pdb' DiskId='1' Source='$(var.INETROOT)\target\$(var.BUILDTYPE)\$(var.BUILDTARGET)\MyservicePf.pdb' /> <RemoveFile Id='REM_MYSERVICE_XML' Name='Myservice_Cache_Service.xml' On='uninstall'/> <ServiceControl Id='Myservice_Cache_Service' Name='Myservice' Start='install' Stop='both' Remove='both' Wait='no'/> <ServiceInstall Id='Myservice_Cache_Service' Name='Myservice' DisplayName='Myservice' Type='ownProcess' Start='auto' ErrorControl='normal' Account='[SERVICEACCOUNT]' Description='Myservice Cache Service'/> ... </Component> </Directory> ------------------------------------------------------------------------------ Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d _______________________________________________ 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 3rd Floor, 40 Grosvenor Place, London, SW1X 7AW (Registered number 166023). For a list of European legal entities within the Invensys Group, please go to http://www.invensys.com/en/legal/default.aspx. You may contact Invensys plc on +44 (0)20 3155 1200 or e-mail recept...@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). ------------------------------------------------------------------------------ Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users