Jan 29, 2015
10:10 AM
I had considered trying the "Reg free" approach, but it got complicated quickly. With several hundreds EXE/DLL/OCX, trying to get our main (entry point) application Reg free did not work, and automating the entire process seemed complicated too, so I did not pursue that solution. Admittedly, I was the only one trying to Reg free our app, and I had no previous Reg free knowledge, it's quite possible I goofed up. It's something I'd like to reconsider sometime in the future though. TBH, I'd rather we migrate our application to C# and not have to deal with COM anymore, but re-coding and re-engineering our entire application to C# is unfortunately not possible... What are the downsides to going Reg free? Any performance hit? What happens if some ActiveXs get registered, does it break the Reg free?
... View more
Jan 28, 2015
01:33 PM
In a new version of our msi install kit, our ActiveX EXE would not register properly, neither using the COM Extract method, nor the SelfReg method. I've found the solution to these problems and thought it might be useful for others to know what I now know about this, without having to muck around like I did. First issue: Failure to register an Active X EXE using Self Reg, with Error 1904 Module failed to register, HRESULT -2147024769 during install. This was caused by having selected, in Tools/Options/Preferences/Self-Registration, "Windows Installer Self-Registration table (SelfReg)" instead of "InstallShield Self-Registration table (ISSelfReg)". Fix: Select "InstallShield Self-Registration table (ISSelfReg)". Cause: the native Windows Installer SelfReg method does not handle EXE files, only DLL/OCX files. It would have been a major timesaver if the IS2014 IDE warned of such an issue when selecting the self-reg option on a file... :mad: Second issue: Using COM Extract at build on same ActiveX EXE results in unusable component - the application crashes when trying to use it. This was caused by building the msi package on a 32 bit OS, and installing that package on a 64 bit OS. (Presumably, installing on a 32 bit OS would work). Fix: build msi package on 64 bit OS. Cause: When building on a 32 bit OS, the resulting COM Extraction is missing ONE critical registry key for each public interface (class) : Under "[HKEY_CLASSES_ROOT\Interface\{your interface GUID}\TypeLib]", the default value is missing. Under a 64 bit OS, that default value is a GUID referring to [HKEY_CLASSES_ROOT\TypeLib\{your component TypelibGUID}], and it seems to trigger the required registry 32/64 reflection required for the component to work. Manually maintaining those registration entries would be completely unfeasible as we have hundreds of ActiveX components and many change at every build, hence we need to use the COM Extract at build option - trying the Self-Reg method was a last resort to try to solve this issue. Strangely, these problems affect only ActiveX EXEs, but not DLLs or OCXs. I hope this information will save some time for others!
... View more
Labels
- Labels:
-
InstallShield 2014
Jan 27, 2015
11:59 AM
Hi DLee65, hope you see this post We had the exact same issue, and even opened a ticket with both Microsoft and Flexera to resolve this issue. Neither Microsoft nor Flexera had a real solution to the issue, namely that MSI minor upgrades do not remove prior COM registration information, resulting in multiple orphaned COM registration entries that crash the application. In house, we call these 'duplicate COM entries'. As you noted, adding and maintaining all the orphaned registration entries in the remove registry table is not manually feasible, however, it can be automated, not at build time, but at runtime... The solution I developed involves a Custom Action DLL, built in C# using the Deployment Tools Fondation (DTF). You can get DTF with the WiX SDK, read about it here : http://blog.deploymentengineering.com/2008/05/deployment-tools-foundation-dtf-custom.html The CA only works if the new COM registration info has been added to the Registry table (ie: use 'COM Extract at build', not 'COM SelfReg'). Here's how it works : For each component marked for installation, retrieve all matching records from the Registry table For each resulting component/Registry record set, determine if any existing registry entries on the PC would become orphaned. Add the orphaned registry entries from the previous step to the Remove Registry table. Let Windows Installer proceed to remove said registry entries... The tests so far have been conclusive : we don't have any orphaned/duplicate COM registration entries after minor updates. This solution hasn't yet been used in production, but it should be soon. I have limited the scope of the CA DLL to scan only for components installed to our installation folder, so problems could still exist for components deployed to other folders, like Windows\System. This problem exists since the very beginning of Windows Installer (15 years!), and I have seen many old posts asking about this; so far no one had a better solution than going the major update route. Honestly, if management had not been so pent up on having minor updates, I would simply have kept the major update solution, like everyone else, but I think my solution is a good one. Maybe I'll put the code up somewhere.
... View more
Jun 18, 2014
09:34 AM
I did, but that's the entire list of registry entries that can be written, which can be different than the actual list of registry entries that will be written, especially in a minor upgrade. It's what I'm using now, but I would prefer to not have to process the entire table, only the entries scheduled to be actually written/installed. Anyone has an idea how to get, at runtime, the actual list/view/table of registry entries the Windows installer engine is going to write during the WriteRegistryValues action?
... View more
Jun 16, 2014
10:30 AM
Is there a way, in the execution phase of a msi, to get the list of registry entries that will actually be written, in a DTF custom action? I know I can get this info from the log after the installation has completed, but I need it at runtime to use in a custom action. What table/view can I query to get this information at run time? The Windows Installer engine must have a table/view with this information, no?
... View more
Labels
- Labels:
-
InstallShield 2014
Jun 06, 2014
09:48 AM
Also note: When rebuilding the msi package with updated ActiveX files using the same msi component codes, same basic msi project def., if we specify the previous msi package as a reference for a MinorUpgrade item, the IS2014 IDE *does* warn about registry entries that will be orphaned, as shown below : ISDEV : warning Val0009: A registry entry has been removed from the component 'AlphaBravoCharlie.dll.v1.0'. This key must be added to the RemoveRegistry table, otherwise it will be orphaned by an upgrade. '0|interface\{64973099-33b4-4701-b72f-64ce94df2604}\typelib|'. c:\abctest\sources.v1.1\kit.previous\abcinstallermsi.msi Since the build engine is aware of the specific registry keys that will be orphaned, having a provision to automatically add these keys in the RemoveRegistry table would have been the definitive solution to the problem... Could InstallShield not implement this?
... View more
Jun 05, 2014
10:50 AM
Seriously though, how do people typically go about updating their ActiveX components? Are they always doing major updates? ActiveX COM may not the favored tech today, but it's still going to be around for some while, and the Windows Installer service has also been around for a while now: how is it that Microsoft or InstallShield hasn't made it easier to do something as simple as updating an ActiveX DLL? It baffles the mind. :confused:
... View more
Jun 05, 2014
09:48 AM
Thanks for the clarifications Michael. I finally got a proof of concept set of msi packages to do a minor upgrade from v1.0.0 to v1.1.0 successfully, with no leftover residual registration info from the old ActiveX component, by using this method when building the msi package v1.1.0: [LIST=1] On the msi component for the old ActiveX, set the Condition to '0' (false) to force a removal (I also set Reevaluate Condition to Yes - not sure if necessary) Add the updated ActiveX as a new msi component, thus creating a new component code for the updated ActiveX DLL/OCX/EXE (GUID) *Note: the updated ActiveX replaces the old one, in the same path when installed. Keep the Product Code and Upgrade Code unchanged from msi package "v1.0.0" to "v1.1.0"; new Package Code always generated on build as per default IS settings Granted, this method works, but it makes it impossible to use a "static" basic msi project for automated builds and requires manually editing the package definition for every build. I'm guessing using "extract COM at build" is not possible either. It also means keeping ALL previous versions of all ActiveX DLL/OCX/EXE in the latest msi package, since the last major upgrade. Even though my proof of concept msi package had only one ActiveX DLL to update, arranging the msi for a successful minor update proved tedious and very hands on; doing this for 20+ components every time we need to build a package will be a major setback vs. our current automated build process... Surely we are not the first to hit this problem. How do others deal with the ActiveX registration/minor upgrade issue?
... View more
May 30, 2014
01:44 PM
So, to clarify: Say I have an ActiveX DLL, with one function, say Function DoThis(); once compiled I get a v1.0 typelib version. This DLL is delivered in a v1.0.0 MSI package, with the rest of the application. Adding a Function DoThat() to that ActiveX DLL will bump its typelib to v1.1, and changes its COM registration accordingly. This DLL is delivered in v1.1.0 MSI package, with the rest of the application. Let's say only this DLL has changed. Note that any exe or library compiled to use the typelib v1.0 remains compatible with the v1.1 typelib. By my understanding of your explanation and the component rules, since the typelib registration has changed, going from the MSI v1.0.0 to v1.1.0 could only be done by a major upgrade, right? If this is indeed the situation, it's means minor updates can never be used in any scenario where ActiveX components need to be updated, right? Is the industry norm for updating applications with many ActiveX COM components (exe/dll/ocx) to always do major updates? If not, what? Any feedback or insight into this issue greatly appreciated.
... View more
May 29, 2014
04:54 PM
In a basic MSI project, during a minor upgrade, how can you unregister the previous ActiveX COM components (DLL/OCX/EXE) before installing the new one? The major upgrade works fine but seems like overkill to update only a handful of files... The minor upgrade results in duplicate registry entries for every ActiveX whose interface has changed; after that, uninstalling leaves orphaned registry entries. Is it the norm to *always* do major upgrades if you have ActiveX components to update? (Seriously?) Has anyone found a solution to this? :confused:
... View more
Labels
- Labels:
-
InstallShield 2014
Aug 15, 2011
01:49 PM
/bump Other than the current workaround, has a real fix to the issue been found? Shouldn't Microsoft be the one who should fix the "Windows Installer Coordinator" to not deadlock installations when they are launched from the same root process?
... View more
Oct 04, 2010
03:49 PM
Actually, our COM components do unregister themselves when uninstalling - there is no trace of them left in the registry after the uninstall. As for the COM-extract best practice, this can only be done for the Key file; our files are added using a Dynamic Link (w. best practices), so this solution is not feasible for us. Also, the COM-extract process results in registry entries that are somewhat different than the component's self-registration process: the COM component is usable by programs but "invisible" for referencing in VB6 or searching through our registry utility. As for coding standards, our COM components are all "Binary Compatible", and we never break an interface. Adding new methods/properties to an existing interface does not break it, it just "versions up" and remains fully backward compatible with every program that used the previous versions. Said previous programs can use the new version without even being recompiled. If you *change* and existing method or property signature, then you are breaking the interface and are indeed creating a 'new' component', thus requiring a new GUID. You really should not just lightly assume we don't know how COM works, nor imply we're not using best practices.
... View more
Oct 01, 2010
02:42 PM
Well, we had to use a Major Upgrade and that solved the double registration of COM components, but it's clearly not the ideal scenario. Does anyone know of a way to unregister COM components before they are upgraded in a Minor Upgrade scenario? TIA
... View more
Sep 27, 2010
01:49 PM
HELP! When doing a minor upgrade, our new COM components are installed and registered, but the old versions are not unregistered before doing so! This results in double entries in the registry for each COM components and crashes our application with errors 430's!!! Is there any way to unregister a COM component before it's updated? Our installation package is a "Basic MSI" project, built w. IS2010 Premier Edition. Our self-reg files are included via Dynamic Linked folders, using the "Self-reg" option and "Create best practices" options. The previous kit's location is specified both as a Minor upgrade item and in the Release/build tab. If the only way to go about this is the use a "major upgrade", this could be a show-stopper for us....
... View more
Labels
- Labels:
-
InstallShield 2010
Aug 24, 2010
04:18 PM
Thanks Robert!! I don't have the time to try this out right now, but I'll keep a sticky on this and update when I try it: it looks like it should solve the problem nicely! (and thanks to chrislynn5 for bumping the thread! 😄 )
... View more
Latest posts by Ih8stupidrules
Subject | Views | Posted |
---|---|---|
2431 | Jan 29, 2015 10:10 AM | |
6170 | Jan 28, 2015 01:33 PM | |
843 | Jan 27, 2015 11:59 AM | |
1357 | Jun 18, 2014 09:34 AM | |
5286 | Jun 16, 2014 10:30 AM | |
1842 | Jun 06, 2014 09:48 AM | |
1842 | Jun 05, 2014 10:50 AM | |
1842 | Jun 05, 2014 09:48 AM | |
1842 | May 30, 2014 01:44 PM | |
4831 | May 29, 2014 04:54 PM |
Activity Feed
- Posted Re: SOLUTION : ActiveX EXE registration FAILS in Basic MSI project on InstallShield Forum. Jan 29, 2015 10:10 AM
- Posted SOLUTION : ActiveX EXE registration FAILS in Basic MSI project on InstallShield Forum. Jan 28, 2015 01:33 PM
- Tagged SOLUTION : ActiveX EXE registration FAILS in Basic MSI project on InstallShield Forum. Jan 28, 2015 01:33 PM
- Tagged SOLUTION : ActiveX EXE registration FAILS in Basic MSI project on InstallShield Forum. Jan 28, 2015 01:33 PM
- Tagged SOLUTION : ActiveX EXE registration FAILS in Basic MSI project on InstallShield Forum. Jan 28, 2015 01:33 PM
- Tagged SOLUTION : ActiveX EXE registration FAILS in Basic MSI project on InstallShield Forum. Jan 28, 2015 01:33 PM
- Tagged SOLUTION : ActiveX EXE registration FAILS in Basic MSI project on InstallShield Forum. Jan 28, 2015 01:33 PM
- Posted SOLUTION to minor upgrade COM issue (orphaned COM registration) on InstallShield Forum. Jan 27, 2015 11:59 AM
- Posted Re: How to get list of registry entries that will be written? on InstallShield Forum. Jun 18, 2014 09:34 AM
- Posted How to get list of registry entries that will be written? on InstallShield Forum. Jun 16, 2014 10:30 AM
- Tagged How to get list of registry entries that will be written? on InstallShield Forum. Jun 16, 2014 10:30 AM
- Tagged How to get list of registry entries that will be written? on InstallShield Forum. Jun 16, 2014 10:30 AM
- Tagged How to get list of registry entries that will be written? on InstallShield Forum. Jun 16, 2014 10:30 AM
- Posted Re: ActiveX COM Registration on minor updates (msi project) on InstallShield Forum. Jun 06, 2014 09:48 AM
- Posted Re: ActiveX COM Registration on minor updates (msi project) on InstallShield Forum. Jun 05, 2014 10:50 AM
- Posted Re: ActiveX COM Registration on minor updates (msi project) on InstallShield Forum. Jun 05, 2014 09:48 AM
- Posted Re: ActiveX COM Registration on minor updates (msi project) on InstallShield Forum. May 30, 2014 01:44 PM
- Posted ActiveX COM Registration on minor updates (msi project) on InstallShield Forum. May 29, 2014 04:54 PM
- Tagged ActiveX COM Registration on minor updates (msi project) on InstallShield Forum. May 29, 2014 04:54 PM
- Tagged ActiveX COM Registration on minor updates (msi project) on InstallShield Forum. May 29, 2014 04:54 PM