Archive: super noob question about VB runtime libraries


super noob question about VB runtime libraries
hi, im new in this of creating installers and have just found NSIS. i have a few questions:

1) i've read lost of topics about installin VB runtime librearies and have read the manual, but cant find if the function:

!insertmacro InstallLib REGDLL $ALREADY_INSTALLED REBOOT_NOTPROTECTED "msvbvm60.dll" "$SYSDIR\msvbvm60.dll" "$SYSDIR"

rewrite the dll if its version is older. how can i prevent a dll file to not being rewritten?

2)how can i see if the dll has been registered or decremeanted correctly? since i have installed Visual Studio in my PC i dont know if it is going to work in another computer, and i dont want to risk its files

3)how can i register my application to appear in "Control Panel>Install/Uninstall programs"?

thanks in advance and sorry if they are answered already and i missed the post.


Hi Zerodyme,

I'm using the example code to install the VB6 Runtime in my installer too and it works fine.

If there's an error there will be a message in the log screen, so you should show it. If you don't show the log screen be patient and write a log to the hdd ;)

on 3)

to have your App in the Software List you have to write RegKeys for it.

Have a look on "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"

you'll find there many entries from which you can figure out how to set the entries you need.

Greetz Dave


Thanks a lot Dave! third point works fine now :) about point 1 and 2 i explain: the example install 7 files

msvbvm60.dll
oleaut32.dll
olepro32.dll
oleaut32.dll
comcat.dll
asycfilt.dll
stdole2.tlb

but using the visual studio installer and seeing the SETUP.LST file, it appears much more files. do i have to have to use the "!insertmacro InstallLib" function for all of them or just copy those files with "FILE" function? the files in question are:

hh.exe
itircl.dll
itss.dll
hhctrl.ocx
RDO20ES.DLL
RDOCURS.DLL
MSRDO20.DLL
MSCMCES.DLL
MSCOMCTL.OCX
CMDLGES.DLL
comdlg32.ocx
MSCOMES.DLL
MSCOMM32.OCX
VB5DB.DLL
MSREPL35.DLL
MSRD2X35.DLL
expsrv.dll
vbajet32.dll
MSJINT35.DLL
MSJTER35.DLL
MSJET35.DLL
dao350.dll
STDFTES.DLL
msstdfmt.dll


ok, now I understand what's with this.

The example in the Docs is for the pure VB6 Runtime, but if you have Components like the MS Common Controls you will need more, thats right.

Not all of those runtime files have to be registered, so you should try or google first which of them need to.

do i have to have to use the "!insertmacro InstallLib" function for all of them or just copy those files with "FILE" function?
You may use the FILE function for the Systemfiles that don't need a registration
e.g. the hh.exe and in the other Case the InstallLib macro.

But I would say you should use the InstallLib for all the DLL and OCX files using either the option "DLL" for those not to reg or "REGDLL" for those which need to be registered.

Of course, the non DLL or OCX Files should be installed with the Files Function always.

I hope this helps

greetz Dave

btw: I hope you excuse my mistakes in the above posts, my english has become a bit rusty ;)

no prob about your english, im also a non english speaker and make a lot of mistakes! :D about the files mentioned, i tried to google if the files must be registered or not, im still searching. but also saw the SETUP.LST file of the VB6 installer and in some files it says "DLLSelfRegister" and in others nop. so i suppose those files must use REGDLLL parameter, but i need confirmation. thanks a lot for your patience


What about writing a batch file which tries to register the files?

If there is no need to register a DLL or OCX there will be a message that the entry point isn't found.

Create a new txt-File with

regsvr32 "itircl.dll"
pause
regsvr32 "tss.dll"
pause
.
.
.

and so on.

If they are in the System32 or the WinDir you don't need the full path I think.

If a file cant be registered there will be an errormessage otherwise there will be a message like "Registering of xyz hast succeeded".


thanks a lot! i tried what you told me and yes, the ones in the SETUP.LST with "DLLSelfRegister" could be registered using

regsvr32 "itircl.dll"

the ones without it couldnt be registered. now i have a tip of which files must be registered and how to test it, thank you Dave!