This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- SOLUTION : ActiveX EXE registration FAILS in Basic MSI project
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 28, 2015
01:33 PM
SOLUTION : ActiveX EXE registration FAILS in Basic MSI project
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.
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!
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:
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!
(3) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 29, 2015
04:34 AM
If you're using these controls in your own application a better way to manage this (In my view) is not to ever register the ActiveX controls but rather manifest them in your main executable.
Obviously I have no knowledge of your application and it might not be possible.
Benefits......no hassles doing the install you just put the files down, make sure you mark them in your install as not COM so you don't get a COM extraction (or an attempt at one).
You keep the registry nice and clean.
You can use MT.EXE to inject a manifest into an executable. Just google MT.EXE MSDN.
Just an idea!
Neil
Obviously I have no knowledge of your application and it might not be possible.
Benefits......no hassles doing the install you just put the files down, make sure you mark them in your install as not COM so you don't get a COM extraction (or an attempt at one).
You keep the registry nice and clean.
You can use MT.EXE to inject a manifest into an executable. Just google MT.EXE MSDN.
Just an idea!
Neil
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎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?
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?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 29, 2015
10:20 PM
First manifesting your application has nothing to changing your code to C# and you don't just want to start converting your code to C# for only a year later to still have exactly the same functionality as you did before. If your code base is working for you then stay with it.
There is no downside.......only an upside.
I have to manifest controls made by codejock into our executables, so how do I go about it?
I use Visual Studio (You could use the Express Version) and create a dummy Winform project, onto the form I drag the required OCX controls but mark them as "isolated", this tells Visual Studio to create a manifest. SO you start hunting down your project sub folder to locate it.
I then edit the manifest, for example the codejock control I want the exe to use are in the applications subfolder called controls.I also take out the checksum information as on occasion we have had a fixed version of the codejock control where the version number has not been changed but the file size has.
Once I have a complete manifest it's then built into the executable. NON of the testers or QA staff are allowed to have the Codejock controls registered on their machines.....then we test the applications. I implemented this when Visa was released and UAC introduced.
It's still worthwhile you pursuing this technique, it would allow you to have different versions of your product running on the same machine (if COM was the limiting factor).
I also have certain DLLS where COM extraction does not work in InstallShield or other tools and I resorted to handcrafting the manifest at great pain.....but its worth it.
There is no downside.......only an upside.
I have to manifest controls made by codejock into our executables, so how do I go about it?
I use Visual Studio (You could use the Express Version) and create a dummy Winform project, onto the form I drag the required OCX controls but mark them as "isolated", this tells Visual Studio to create a manifest. SO you start hunting down your project sub folder to locate it.
I then edit the manifest, for example the codejock control I want the exe to use are in the applications subfolder called controls.I also take out the checksum information as on occasion we have had a fixed version of the codejock control where the version number has not been changed but the file size has.
Once I have a complete manifest it's then built into the executable. NON of the testers or QA staff are allowed to have the Codejock controls registered on their machines.....then we test the applications. I implemented this when Visa was released and UAC introduced.
It's still worthwhile you pursuing this technique, it would allow you to have different versions of your product running on the same machine (if COM was the limiting factor).
I also have certain DLLS where COM extraction does not work in InstallShield or other tools and I resorted to handcrafting the manifest at great pain.....but its worth it.
![](/skins/images/D60DF682EA37BF37032955CE10F3F0BB/responsive_peak/images/icon_anonymous_message.png)