Hi All,
Allow me to recap this issue please. Basically, we have an old product(uses Wix 2.0) that is an Outlook plugin application. We use a COM component adxloader.dll from "Add-in Express"(http://www.add-in-express.com/) in the product. What we need to do is to install the adxloader.dll and register it as a COM. But unfortunately, adxloader isn't friendly for Wix. By using tallow or heat, we can't generate the correct fragments from it. But somebody gives us a solution: http://blogs.microsoft.co.il/blogs/yanush/archive/2008/09/22/howto-use-regsvr32-exe-with-wix.aspx It is kind of working. But there are two problems: 1. After installation, if we re-run the installer and choose "Repair". Then Outlook will crash when we start it. This is because these statements: <CustomAction Id="RegisterAdx" Directory="INSTALLDIR" ExeCommand='regsvr32.exe /s "[INSTALLDIR]adxloader.dll"' Return="check"> </CustomAction> <CustomAction Id="UnregisterAdx" Directory="INSTALLDIR" ExeCommand='regsvr32.exe /s /u "[INSTALLDIR]adxloader.dll"'> </CustomAction> <InstallExecuteSequence> <Custom Action="RegisterAdx" After="InstallFinalize">NOT Installed</Custom> <Custom Action="UnregisterAdx" Before="InstallInitialize">Installed</Custom> </InstallExecuteSequence> As what you can see, during Repair, the dll will be unregistered. If the dll isn't registered, then Outlook will crash. So I changed the condition to make sure we only unregister the dll in uninstall or remove: <Custom Action="UnregisterAdx" Before="InstallInitialize">Remove="ALL"</Custom> This seems working. 2. Out QA also tested this case which is failed: after installation, delete the adxloader.dll, and run the installer again and choose Repair - the result is that the adxloader.dll never comes back and throws a 'Error 2836'. I think this is related to #1. The reason is because in Repair, the installer will try to unregister the file, and couldn't find the file. By fixing #1, this problem seems gone. Right now, it seems working. I totally understand 'using regsvr32 in Wix' is not recommended. But in this adxloader.dll case, we can't use tallow or heat to generate fragments from the dll. This is not the problem of tallow or heat, but the problem of the dll. However, the dll can be registered manually by using regsvr32.exe. So my question is: is there a way that we can collect the needed registry information manually? If it's possible, then we can get rid of regsvr32. Please let me know. I appreciate it. ________________________________ From: little.forest <little.for...@ymail.com> To: General discussion for Windows Installer XML toolset. <wix-users@lists.sourceforge.net> Sent: Mon, March 29, 2010 5:35:29 PM Subject: Re: [WiX-users] Wix 2.0: if some dll file(s) deleted, then we'll get "Error 2836" in Repair mode Thanks Chad. Actually I tried that, but I got some errors: Microsoft (R) Windows Installer Xml Tool version 2.0.5325.0 Copyright (C) Microsoft Corporation 2003. All rights reserved. <Fragment> <DirectoryRef Id="TARGETDIR"> <Component Id="component0" DiskId="1" Guid="PUT-GUID-HERE"> <File Id="file0" Name="ADXLOA_1.DLL" LongName="adxloader.dll" Source="C:\mydir\adxloader.dll" />Failed to SelfReg: adxloader.dll System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.TypeInitializationException: Type constructor threw an exception. at DllRegisterServer() --- End of inner exception stack trace --- at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttrib utes methodAttributes, RuntimeTypeHandle typeOwner) at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes met hodAttributes, RuntimeTypeHandle typeOwner) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters , CultureInfo culture, Boolean skipVisibilityChecks) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters , CultureInfo culture) at Microsoft.Tools.WindowsInstallerXml.Tools.Tallow.TallowMain.DynamicPInvoke(String dll, String entryPoint, Type ret urnType, Type[] parameterTypes, Object[] parameterValues) at Microsoft.Tools.WindowsInstallerXml.Tools.Tallow.TallowMain..ctor(String[] args) <Registry Root="HKCU" Key="Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" Name="Personal" /> <Registry Root="HKCU" Key="Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /> </Component> </DirectoryRef> </Fragment> </Wix> ________________________________ From: Chad Petersen <chad.peter...@harlandfs.com> To: General discussion for Windows Installer XML toolset. <wix-users@lists.sourceforge.net> Sent: Mon, March 29, 2010 2:40:07 PM Subject: Re: [WiX-users] Wix 2.0: if some dll file(s) deleted, then we'll get "Error 2836" in Repair mode Look at the Tallow.exe utility. I think Tallow -s <filename> might be a first step to try. Chad -----Original Message----- From: little.forest [mailto:little.for...@ymail.com] Sent: Monday, March 29, 2010 2:28 PM To: General discussion for Windows Installer XML toolset. Subject: Re: [WiX-users] Wix 2.0: if some dll file(s) deleted,then we'll get "Error 2836" in Repair mode Thanks Bob. That dll is provided by a 3rd party company. We don't know how it's implemented. But I guess something isn't quite right with the DLL. We'll try to talk to the dll provider to understand the detail. The dll can be registered correctly by using regsvr32.exe. So after using regsvr32.exe, is there a way that we could manually collect the registry info for the dll and then use them in the installer? Thanks. ________________________________ From: Bob Arnson <b...@joyofsetup.com> To: wix-users@lists.sourceforge.net Sent: Sat, March 27, 2010 12:06:31 PM Subject: Re: [WiX-users] Wix 2.0: if some dll file(s) deleted, then we'll get "Error 2836" in Repair mode On 3/26/2010 2:12 PM, little.forest wrote: > 2. Those two DLL files will cause 'Error 2836' directly. But the manifest file will cause the installer showing 'The system can not find the file specified.' first then showing the 'Error 2836'. So this is slightly different from those two DLL files. > As I mentioned, that's not a fatal error. There's some other error that might be helpful in diagnosing your root problem. > 1. If my guess is correct, please post some links here about how to register a COM component correctly in 2.0. Meanwhile, I'll dig in this topic as well. > Use Class, Interface, ProgId, Extension, Verb, TypeLib. -- sig://boB http://joyofsetup.com/ ------------------------------------------------------------------------ ------ Download Intel(r) Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users __________________________________________________________________ Connect with friends from any web browser - no download required. Try the new Yahoo! Canada Messenger for the Web BETA at http://ca.messenger.yahoo.com/webmessengerpromo.php ------------------------------------------------------------------------ ------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users __________________________________________________________________ Looking for the perfect gift? Give the gift of Flickr! http://www.flickr.com/gift/ ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users __________________________________________________________________ The new Internet Explorer® 8 - Faster, safer, easier. Optimized for Yahoo! Get it Now for Free! at http://downloads.yahoo.com/ca/internetexplorer/ ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users