Page 1 of 1
How to register a VB6 ActiveX EXE?
Posted: Mon Mar 06, 2006 11:33 am
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
Posted: Mon Mar 06, 2006 3:53 pm
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.
Posted: Tue Mar 07, 2006 4:33 am
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.'
Posted: Tue Mar 07, 2006 8:25 am
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.
Posted: Tue Mar 07, 2006 11:33 am
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
cu
Markus
Posted: Wed Mar 08, 2006 2:46 am
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
Posted: Wed Mar 08, 2006 8:36 am
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
Posted: Wed Mar 08, 2006 8:57 am
by MikeFieger
Hi!
Thank you, supplying the full path for 'Run Program' worked.
Mike