Wix installer: installed service unable to read HKLM registry entries on start

后端 未结 1 610
既然无缘
既然无缘 2021-01-24 18:39

I\'m using wix tool 3.11 to create a msi which install a service. The installer runs a Custom Action and returns vars to wix to write to registry (HKLM). The service starts and

相关标签:
1条回答
  • 2021-01-24 19:17

    Solution: The problem in this case was that the registry keys were not found in the expected location in the registry due to 32-bit / 64-bit issues.

    • 64-bit section: HKEY_LOCAL_MACHINE\SOFTWARE\Company\App - MyValue
    • 32 bit section: HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Company\App - MyValue

    End of answer. Leaving debugging efforts in place below though:


    Round 1:

    Maybe try to read these two recent answers and check if anything rings a bell:

    • Wix Service Installer sometimes fails to install or start
    • Wix - ServiceControl start takes four minutes to fail, should be 30 sec

    What does it say in the event viewer? (Windows + R eventvwr and OK)


    Round 2:

    • Bitness: Are you sure you are reading from the right location in the registry? Are you installing a 32-bit MSI or a 64-bit MSI? (looks like 32-bit)
      • 64-bit section: HKEY_LOCAL_MACHINE\SOFTWARE\Company\App
      • 32 bit section: HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Company\App
    • Permissions: Did you check the permissions for the registry keys and values your setup writes using regedit.exe to inspect? Right click => Permissions (have to ask).
    • Privileges: What account do you use to run the service? It sort of looks like standard LocalSystem? The account needs the SeServiceLogonRight privilege. See second line on section above for details.
    • Logging: Do you use log4net or some other logging feature in your service? Did you try the verbose, debug MSI logging found in the first link in the top section?
    0 讨论(0)
提交回复
热议问题