Unable to register OCX library

Got a problem you cannot solve? Try here.
mschiff
Posts: 3
Joined: Thu Apr 12, 2007 9:58 am

Unable to register OCX library

Postby mschiff » Thu Apr 12, 2007 11:02 am

I have tried everything to register an OCX library, and nothing seems to work. I have read everything here related to doing it, and followed all the suggestions, but no matter what, it does not get registered. The file is installed properly, but the REGISTER LIBRARY command always fails no matter where I put it. After installation, if I use REGSVR32.EXE, the control registers with no problem at all.

I have inserted the following code at various places in the script, and it always fails:

Register Library $TARGETDIR$\\ImageViewer2.OCX (get result into variable SUCCESS)
if Variable SUCCESS Equals FALSE
MessageBox: ImageViewer2.OCX Failed to register, The ImageViewer2.OCX file failed to register with the operating system. Contact the developer.
end

I have tried putting the code immediately after the Apply Install line in the script, and even at the very end of the script after all processing is complete, but it always returns FALSE and the control does not get registered.

How can I overcome this problem?

-- Martin

MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Postby MichaelNesmith » Thu Apr 12, 2007 11:14 am

Well, you can try two more things -

1. Capture the self-reg information directly into the registry view,
2. Use the self-register option in the Install Files command.

If all else fails...you can always fall-back to Run Program, of course.
Michael Nesmith
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/

mschiff
Posts: 3
Joined: Thu Apr 12, 2007 9:58 am

Postby mschiff » Thu Apr 12, 2007 1:26 pm

Michael,

I already tried checking the self register option. The OCX is not able to be self registered (though I am self registering others successfully).

How would I capture the self-reg information?

-- Martin

MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Postby MichaelNesmith » Fri Apr 13, 2007 8:53 am

Is self reg failing because a particular order is necessary for self registration, or is it something else that is going on? I'm wondering if its a control issue - maybe you need to set the working directory to the control folder?

I'd suggest running regsvr32 from a folder outside of the OCX's install folder. If that also fails, you'll know the control needs its working folder to be set before being registered; so you can use Register Library that way.

To import, try the Registry view, and choose Import.
Michael Nesmith

InstallAware

Home of The Next Generation MSI Installer

Get your free copy today - http://www.installaware.com/


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 51 guests