cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
csd1304
Level 2

Installshield 2009: Self-registration of activex ocx failed under Windows 7

Hi all,
I have a problem installing our installation package (IS 2009 Prof. / Installscript) on a Windows 7 machine.
Until now we only supported operating systems up to Windows XP and our installation was properly running, incl. self-registration of activex components.

The logged in Windows 7 user performing all the following actions is member of the Administrators group.

Installing on a machine running Windows 7 gives us several errors during self-registration of activex components.

For example:
"cwui.ocx" from Measurement Studio for Visual Studio 6 failed with: "Error: 0x80040200"

"hhctrl.ocx" failed with: "Error accessing the OLE registry."

The Required Execution Level of our installation package is set to Administrator but this does not fix our problem.

Add. some more ocx files are not self-registered during installation without any error messages.

However: Registering all these activex components in an elv. command shell works fine and makes our applications run properly under Windows 7.

So my question is: What do we have to change in our installation settings to fix this errors/problems?
Does IS 2010 Prof. / Installscript support the self-registration of active ocx/dll files in Windows 7?

Thanks in advance!

csd1304
Labels (1)
0 Kudos
(2) Replies
adison
Level 2

The logged in Windows 7 user performing all the following actions is member of the Administrators group.
Installing on a machine running Windows 7 gives us several errors during self-registration of activex components.
For example:
"cwui.ocx" from Measurement Studio for Visual Studio 6 failed with: "Error: 0x80040200
"hhctrl.ocx" failed with: "Error accessing the OLE registry."
0 Kudos
joshstechnij
Level 10 Flexeran
Level 10 Flexeran

Self registration support in InstallScript projects is provided by loading the DLL/OCX file with LoadLibrary and then calling its DllRegisterServer entry point. This function in the DLL/OCX is then responsible for correctly writing registry keys needed for the file.

These errors can be caused by attempting to overwrite registry keys that are protected by Windows Resource Protection (WRP). Registering the file with regsvr32 will typically work because this executable is shimmed by the operating system's application compatibility support to ignore failures writing to protected registry keys (basically, it causes the registry APIs to return a success result when the API would have otherwise failed).

Another possible cause is changes to how the RegisterTypeLib API works in Vista SP1 and newer. Some COM servers will call this API to register their type libraries in their DllRegisterServer entry point. It is possible for this to fail in certain circumstances that we have seen. You can determine if this is the cause of the failure by creating a machine wide environment variable named OAPERUSERTLIBREG and setting its value to 1. Then, run the installation to see if this changes the behavior. If it does, then this would indicate the OCX registrations are failing due these changes in the operating system. You can resolve the behavior in your setup by calling the OaEnablePerUserTLibRegistration API in oleaut32.dll from your script.

If the failures continue, then the more likely cause is the registrations are failing due to their attempting to write to protected registry keys (in this case, the registration code in the OCX's needs to be changed to not do this, or ignore the failures).

It seems most likely that hhctrl.ocx, if this is the Microsoft HTML Help Control, is failing because it is a part of the operating system and will therefore have its COM registry keys protected by WRP. In general, operating system components should not be included in an application's installer.
0 Kudos