Archive: DLL register (VB6) - urgent!


DLL register (VB6) - urgent!
Hello!

I have an application in VB6, and in the SETUP.lst file is included:

[Bootstrap Files]
VB6STKIT.DLL,$(WinSysPathSysFile),,,7/15/00 12:00:00 AM,101888,6.0.84.50
MSVCRT40.DLL,$(WinSysPathSysFile),,,5/31/98 12:00:00 AM,326656,4.21.0.0
ASYCFILT.DLL,$(WinSysPathSysFile),,,8/31/99 4:55:18 PM,147728,2.40.4277.1
COMCAT.DLL,$(WinSysPathSysFile),$(DLLSelfRegister),,5/31/98 12:00:00 AM,22288,4.71.1460.1
OLEPRO32.DLL,$(WinSysPathSysFile),$(DLLSelfRegister),,2/4/03 11:32:42 AM,229376,5.0.4518.0
OLEAUT32.DLL,$(WinSysPathSysFile),$(DLLSelfRegister),,2/4/03 11:32:40 AM,929792,2.40.4518.0
msvbvm60.dll,$(WinSysPathSysFile),$(DLLSelfRegister),,11/8/00 3:02:46 PM,1388544,6.0.89.64
STDOLE2.TLB,$(WinSysPathSysFile),$(TLBRegister),,2/4/03 11:32:40 AM,16896,2.40.4518.0

[Setup1 Files]
File3=@MSREPL35.DLL,$(WinSysPathSysFile),,,8/17/01 10:59:00 AM,430080,3.51.2404.0
File5=@expsrv.dll,$(WinSysPathSysFile),,,6/24/99 11:40:58 PM,379152,6.0.0.8540
File6=@vbajet32.dll,$(WinSysPathSysFile),,,1/22/99 4:09:38 AM,30992,6.0.1.8268
File7=@msjint35.dll,$(WinSysPathSysFile),,,4/24/98 12:00:00 AM,123664,3.51.623.0
File8=@msjter35.dll,$(WinSysPathSysFile),,,4/24/98 12:00:00 AM,24848,3.51.623.0
File2=@VB5DB.DLL,$(WinSysPath),,$(Shared),6/18/98 12:00:00 AM,89360,6.0.81.69
File4=@msrd2x35.dll,$(WinSysPathSysFile),$(DLLSelfRegister),,9/5/01 2:00:00 PM,262144,3.51.623.0
File9=@MSJET35.DLL,$(WinSysPathSysFile),$(DLLSelfRegister),,5/5/99 10:22:00 PM,1056768,3.51.2723.0
File1=@Mscomctl.ocx,$(WinSysPath),$(DLLSelfRegister),$(Shared),1/6/99 5:18:14 AM,1057552,6.1.83.41
File6=@MSMASK32.OCX,$(WinSysPath),$(DLLSelfRegister),$(Shared),5/22/00 12:00:00 AM,166600,6.0.84.18
File7=@MSFLXGRD.OCX,$(WinSysPath),$(DLLSelfRegister),$(Shared),5/22/00 12:00:00 AM,244416,6.0.84.18
File8=@DBGRID32.OCX,$(WinSysPath),$(DLLSelfRegister),$(Shared),6/24/98 12:00:00 AM,525352,5.1.81.4
File9=@Comdlg32.ocx,$(WinSysPath),$(DLLSelfRegister),$(Shared),5/6/99 11:00:00 PM,140288,6.0.84.18
File10=@dao350.dll,$(MSDAOPath),$(DLLSelfRegister),$(Shared),4/27/98 12:00:00 AM,570128,3.51.1608.0

I'm a beginner in registering dll files, so:

1 - What's the best way to register these dll files?

2 - First of all, I'm copying the dll files with "file components\VB6STKIT.DLL", for example, to copy the dll files to their directory, and then I use InstallLib command to register... is it correct? I'm not sure if InstallLib command installs AND register dll files at the same time!

3 - I thought to pack vbrun60.exe and msvbvm50.exe files, but they don't include all these dll files, so I think it's not recommended to use them to install, am I right?

4 - Also, when I try to run these .exe files, I receive the msg "Error registering the oleaut32.dll" for example. Why this is happening - maybe it's because I have already this dll installed on my machine?

5 - How can I register the Shared and TLBRegister files? What does it happens if I register without specifying the "shared" information?

Thanks!
Fernando


Hi again!
I changed the code and did this:

#VB DLL
!insertmacro InstallLib DLL NOTSHARED REBOOT_PROTECTED "componentes\VB6STKIT.DLL" "$SYSDIR\VB6STKIT.DLL" $SYSDIR
!insertmacro InstallLib DLL NOTSHARED REBOOT_PROTECTED "componentes\MSVCRT40.dll" "$SYSDIR\MSVCRT40.dll" $SYSDIR
!insertmacro InstallLib DLL NOTSHARED REBOOT_PROTECTED "componentes\ASYCFILT.DLL" "$SYSDIR\ASYCFILT.DLL" $SYSDIR
!insertmacro InstallLib REGDLL NOTSHARED REBOOT_PROTECTED "componentes\COMCAT.DLL" "$SYSDIR\COMCAT.DLL" $SYSDIR
!insertmacro InstallLib REGDLL NOTSHARED REBOOT_PROTECTED "componentes\OLEPRO32.DLL" "$SYSDIR\OLEPRO32.DLL" $SYSDIR
!insertmacro InstallLib REGDLL NOTSHARED REBOOT_PROTECTED "componentes\OLEAUT32.DLL" "$SYSDIR\OLEAUT32.DLL" $SYSDIR
!insertmacro InstallLib REGDLL NOTSHARED REBOOT_PROTECTED "componentes\msvbvm60.dll" "$SYSDIR\msvbvm60.dll" $SYSDIR
!insertmacro InstallLib REGDLLTLB NOTSHARED REBOOT_PROTECTED "componentes\STDOLE2.TLB" "$SYSDIR\STDOLE2.TLB" $SYSDIR

#Other DLL
!insertmacro InstallLib DLL NOTSHARED REBOOT_PROTECTED "componentes\MSREPL35.DLL" "$SYSDIR\MSREPL35.DLL" $SYSDIR
!insertmacro InstallLib DLL NOTSHARED REBOOT_PROTECTED "componentes\expsrv.dll" "$SYSDIR\expsrv.dll" $SYSDIR
!insertmacro InstallLib DLL NOTSHARED REBOOT_PROTECTED "componentes\vbajet32.dll" "$SYSDIR\vbajet32.dll" $SYSDIR
!insertmacro InstallLib DLL NOTSHARED REBOOT_PROTECTED "componentes\msjint35.dll" "$SYSDIR\msjint35.dll" $SYSDIR
!insertmacro InstallLib DLL NOTSHARED REBOOT_PROTECTED "componentes\msjter35.dll" "$SYSDIR\msjter35.dll" $SYSDIR
!insertmacro InstallLib DLL SHARED REBOOT_PROTECTED "componentes\VB5DB.DLL" "$WINDIR\VB5DB.DLL" $WINDIR
!insertmacro InstallLib REGDLL NOTSHARED REBOOT_PROTECTED "componentes\msrd2x35.dll" "$SYSDIR\msrd2x35.dll" $SYSDIR
!insertmacro InstallLib REGDLL NOTSHARED REBOOT_PROTECTED "componentes\msrd2x35.dll" "$SYSDIR\msrd2x35.dll" $SYSDIR
!insertmacro InstallLib REGDLL NOTSHARED REBOOT_PROTECTED "componentes\MSJET35.DLL" "$SYSDIR\MSJET35.DLL" $SYSDIR
!insertmacro InstallLib REGDLL SHARED REBOOT_PROTECTED "componentes\Mscomctl.ocx" "$WINDIR\Mscomctl.ocx" $WINDIR
!insertmacro InstallLib REGDLL SHARED REBOOT_PROTECTED "componentes\MSMASK32.OCX" "$WINDIR\MSMASK32.OCX" $WINDIR
!insertmacro InstallLib REGDLL SHARED REBOOT_PROTECTED "componentes\MSFLXGRD.OCX" "$WINDIR\MSFLXGRD.OCX" $WINDIR
!insertmacro InstallLib REGDLL SHARED REBOOT_PROTECTED "componentes\DBGRID32.OCX" "$WINDIR\DBGRID32.OCX" $WINDIR
!insertmacro InstallLib REGDLL SHARED REBOOT_PROTECTED "componentes\Comdlg32.ocx" "$WINDIR\Comdlg32.ocx" $WINDIR
!insertmacro InstallLib REGDLL SHARED REBOOT_PROTECTED "componentes\dao360.dll" "$WINDIR\dao360.dll" $WINDIR

#DAO registering
!define MSDAOPath "$COMMONFILES\Microsoft Shared\DAO"
!insertmacro InstallLib REGDLL SHARED REBOOT_PROTECTED "componentes\dao350.dll" "${MSDAOPath}\dao350.dll" "${MSDAOPath}"

My questions:

I'm not sure if the dll were installed, because when I installing the application, it says: "Registering xxxx.dll" - but it doesn't show all the dll's in the list above, and if the dll was successfuly registered! Then it shows only the message "Finished".

Is it good to use REBOOT_PROTECTED?
I saw in other examples using the variable ALREADY_INSTALLED - do I have to use it too?

Is there any way(command) to know if the dll were registered? Considering the fact that I have already these dll's registered in my machine. I use REGEDIT to search a specific dll, but when I find it, I don't know if the dll I found is the one I registered!

thanks!


VB6 - me also
I also am trying to make an installer for a VB6 package and also need to do a DLLSELFREGISTER as well as self-register some OCX active-X files.

Has anyone had any luck with this?
thanks
F


Re: DLL register (VB6) - urgent!

Originally posted by fnonaka
I'm a beginner in registering dll files, so:

1 - What's the best way to register these dll files?
Using RegDLL, also you should read this wiki pages:
http://nsis.sourceforge.net/How_to_i...e_VB6_runtimes
http://nsis.sourceforge.net/How_can_...e_VB6_runtimes
http://nsis.sourceforge.net/VB_Converter
http://nsis.sourceforge.net/Docs/AppendixB.html
http://nsis.sourceforge.net/Register...gister_Typelib
2 - First of all, I'm copying the dll files with "file components\VB6STKIT.DLL", for example, to copy the dll files to their directory, and then I use InstallLib command to register... is it correct? I'm not sure if InstallLib command installs AND register dll files at the same time!
See above links
3 - I thought to pack vbrun60.exe and msvbvm50.exe files, but they don't include all these dll files, so I think it's not recommended to use them to install, am I right?
Why not use the M$ VB[5][6] runtime installer? Nsis can launch external executables.
4 - Also, when I try to run these .exe files, I receive the msg "Error registering the oleaut32.dll" for example. Why this is happening - maybe it's because I have already this dll installed on my machine?
That, or corrupted or bad version, error on system core, also bad Windows version, don't know..there can be tons of reasons in windows environment.
5 - How can I register the Shared and TLBRegister files? What does it happens if I register without specifying the "shared" information?

Thanks!
Fernando [/B]
See above links.