How to register a VB6 ActiveX EXE?

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

How to register a VB6 ActiveX EXE?

Postby MikeFieger » Mon Mar 06, 2006 11:33 am

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:

Postby jimo » Mon Mar 06, 2006 3:53 pm

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

Postby MikeFieger » Tue Mar 07, 2006 4:33 am

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:

Postby jimo » Tue Mar 07, 2006 8:25 am

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:

Postby casic » Tue Mar 07, 2006 11:33 am

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
InstallAware MVP
If it can't be done with InstallAWARE then you are not using Windows

MikeFieger
Posts: 52
Joined: Thu Jan 26, 2006 9:09 am

Postby MikeFieger » Wed Mar 08, 2006 2:46 am

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:

Postby jimo » Wed Mar 08, 2006 8:36 am

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

Postby MikeFieger » Wed Mar 08, 2006 8:57 am

Hi!

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

Mike


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 28 guests