Hello, I have a problem trying to register some COM components using WiX. Hopefully you can help me find the correct solution
We need to create an MSI with WiX for Windows Vista and XP which, aside from installing some files, must register: 1- a COM dll 2- a COM server (.exe), 3- and a Windows service. These three components are built in ATL C++. So they are normally registered like so: 1- regsvr32.exe THE_COM_DLL.dll 2- THE_COM_SERVER.exe /RegServer 3- THE_WIN_SERVICE.exe /Service According to our research, there are a number of ways in which we can deploy and register these components with a WiX generated MSI, all of which have failed for us: *1- Call the previously mentioned commands explicitly as custom actions, setting them in the ExeCommand with a relative path to the installation folder.* In Vista these actions must run with elevated privileges, which is supposedly achieved by making the action deferred and with the no-impersonate flag set. We have tried making the custom actions deferred and not deferred, set the Impersonate flag to both "yes" and "no", and so on, but the custom actions fail with code 1721 and a result value of 3. *2- Create custom actions using the FileKey attribute and passing the argument (e.g. "/RegServer") in the ExeCommand attribute.* Same result, code 1721 and result value 3. Seems like the commands need to run with elevated privileges, but as we mentioned we have marked them as deferred and no impersonate and the result is the same. *3- Set the SelfRegCost flag to 1 in each File tags in the WiX file for each component.* This only applies to the COM dll, but it does not work either. We set the KeyPath="yes" attribute and tried some other attribute combinations but the result is the same. In addition, seems like self-registration is strongly discouraged by Microsoft. * 4- For the service, use the ServiceInstall and ServiceControl tags in WiX.* This way we were able to register the service, but it fails to start because of permissions. *5- Lastly, a solution was to use tallow/heat to recreate the registry entries.* Neither heat nor tallow alone are able to determine all the registry entries necessary to register the services. Supposedly it does work for the COM dll. So we tried the following, based on a recommendation we found: - Monitored registry modifications after each component's registration with a tool called RegSpy2, which generates a list of registry entries, and saved each one to a .reg file. - Using tallow we created a WiX fragment for each component which has all the detected registry entries. - Using WixCop we converted the Registry tags to RegistryKey and RegistryValue tags, because we are using WiX 3. - Then we replaced the hardcoded paths with [INSTALLDIR], which points to the installation folder in the target machine. The installation runs fine with this procedure, but the components do not work: the service does not appear in the services list, and the com objects cannot be instantiated. Given this scenario, which would be the correct way to register these components using WiX 2/3? Thanks in advance -- Jose Enrique BolaƱos G. Software Developer Glaxstar Ltd. ------------------------------------------------------------------------------ Stay on top of everything new and different, both inside and around Java (TM) technology - register by April 22, and save $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. 300 plus technical and hands-on sessions. Register today. Use priority code J9JMT32. http://p.sf.net/sfu/p _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users