How to register a VB6 ActiveX EXE?

Got a problem you cannot solve? Try here.
Post Reply
MikeFieger
Posts: 52
Joined: Thu Jan 26, 2006 9:09 am

How to register a VB6 ActiveX EXE?

Post by MikeFieger »

Hi!

I need to register a VB6 ActiveX EXE.
It seems that this can not be done with the commandline parameter /RegSvr.

The command 'Register Library' also returned FALSE.

What else can I do?

Mike
jimo
Posts: 342
Joined: Fri Aug 19, 2005 10:59 am
Location: Atlanta, GA
Contact:

Post by jimo »

First off, outside of InstallAware will the acitve x dll register using the following from the run prompt?

regsvr32 "full path and file name including extension"

If that returns success then add the file to your project and mark it as a self registering dll.
MikeFieger
Posts: 52
Joined: Thu Jan 26, 2006 9:09 am

Post by MikeFieger »

Hi!

As I said it is an EXE file, so regsvr32 says something like 'Program.exe is no .DLL or .OCX-file'

If I check 'File is self registering DLL' then I get the following error when running the setup:
'Module Program.exe failed to register. HRESULT -2147024769. Contact your support personnel.'
jimo
Posts: 342
Joined: Fri Aug 19, 2005 10:59 am
Location: Atlanta, GA
Contact:

Post by jimo »

My point in my previous post was that if regsvr32 won't register it then IA won't register it.

I would check with the entity that provided a VB6 active X Exe and find out how they expect it to be registered then implement that in your script.

If this is an in hous program I personally would recompile it as an acitve x dll or ocx.
casic
Posts: 260
Joined: Thu Mar 17, 2005 4:02 am
Location: Germany
Contact:

Post by casic »

Hi,

an ActiveX-EXE can never be registered with regsvr32.exe - this type of ActiveX component is self registered by the first execution of itself. So simply run the ActiveX-EXE to register it :D

cu

Markus
Markus Diettrich
Install[b]Aware[/b] MVP
[i]If it can't be done with InstallAWARE then you are not using Windows[/i]
MikeFieger
Posts: 52
Joined: Thu Jan 26, 2006 9:09 am

Post by MikeFieger »

Hi!

Thank you, but the problem is, I don´t want to start the program after installation. (The ActiveX EXE is only a part of the installed program).

I found out that it works if start it manually from the commandline with the switch '/regserver', so I tried to add the command 'Run program' with the command line parameter '/regserver' to the install script but that still doesnt seem to work :-(

Any further help would be greatly appreciated :-)

Mike
jimo
Posts: 342
Joined: Fri Aug 19, 2005 10:59 am
Location: Atlanta, GA
Contact:

Post by jimo »

Try something like this;


Set Variable INSTALLDIR to $TARGETDIR$
Convert to Short Path: INSTALLDIR
Call DLL Function kernel32.dll->SetCurrentDirectoryA (get result into variable LASTERROR) (Of cousre the dir to set is $INSTALLDIR$)
Run Program $INSTALLDIR$\\myapp.exe with the appropriate commandline
MikeFieger
Posts: 52
Joined: Thu Jan 26, 2006 9:09 am

Post by MikeFieger »

Hi!

Thank you, supplying the full path for 'Run Program' worked.

Mike
Post Reply