Archive: Strange crashes on Win98 SE


Strange crashes on Win98 SE
Hello,

I'm trying to make an installer for an application written in VB6 that uses MDAC. I encountered a very big problem with it. The original script was basically as follows:

; Install MDAC 2.5
file "Files\mdac_typ.exe"
ExecWait '"$INSTDIR\mdac_typ.exe" /q:a /c:"setup.exe /QN1"'
Delete "$INSTDIR\mdac_typ.exe"

; Install system libraries
!insertmacro InstallLib REGDLL $ALREADY_INSTALLED REBOOT_NOTPROTECTED "files\msvbvm60.dll" "$SYSDIR\msvbvm60.dll" "$SYSDIR"
!insertmacro InstallLib REGDLL $ALREADY_INSTALLED REBOOT_PROTECTED "files\oleaut32.dll" "$SYSDIR\oleaut32.dll" "$SYSDIR"
!insertmacro InstallLib REGDLL $ALREADY_INSTALLED REBOOT_PROTECTED "files\olepro32.dll" "$SYSDIR\olepro32.dll" "$SYSDIR"
!insertmacro InstallLib REGDLL $ALREADY_INSTALLED REBOOT_PROTECTED "files\comcat.dll" "$SYSDIR\comcat.dll" "$SYSDIR"
!insertmacro InstallLib DLL $ALREADY_INSTALLED REBOOT_PROTECTED "files\asycfilt.dll" "$SYSDIR\asycfilt.dll" "$SYSDIR"
!insertmacro InstallLib TLB $ALREADY_INSTALLED REBOOT_PROTECTED "files\stdole2.tlb" "$SYSDIR\stdole2.tlb" "$SYSDIR"

!insertmacro InstallLib REGDLL $ALREADY_INSTALLED REBOOT_PROTECTED "files\Tabctl32.ocx" "$SYSDIR\Tabctl32.ocx" "$SYSDIR"
!insertmacro InstallLib REGDLL $ALREADY_INSTALLED REBOOT_PROTECTED "files\COMDLG32.OCX" "$SYSDIR\COMDLG32.OCX" "$SYSDIR"
!insertmacro InstallLib REGDLL $ALREADY_INSTALLED REBOOT_PROTECTED "files\MSDATLST.OCX" "$SYSDIR\MSDATLST.OCX" "$SYSDIR"
!insertmacro InstallLib REGDLL $ALREADY_INSTALLED REBOOT_PROTECTED "files\msstdfmt.dll" "$SYSDIR\msstdfmt.dll" "$SYSDIR"
!insertmacro InstallLib REGDLL $ALREADY_INSTALLED REBOOT_PROTECTED "files\MSDATGRD.OCX" "$SYSDIR\MSDATGRD.OCX" "$SYSDIR"
!insertmacro InstallLib REGDLL $ALREADY_INSTALLED REBOOT_PROTECTED "files\Msflxgrd.OCX" "$SYSDIR\Msflxgrd.OCX" "$SYSDIR"
!insertmacro InstallLib REGDLL $ALREADY_INSTALLED REBOOT_PROTECTED "files\Mscomct2.ocx" "$SYSDIR\Mscomct2.ocx" "$SYSDIR"
!insertmacro InstallLib REGDLL $ALREADY_INSTALLED REBOOT_PROTECTED "files\MSCOMCTL.OCX" "$SYSDIR\MSCOMCTL.OCX" "$SYSDIR"
!insertmacro InstallLib REGDLL $ALREADY_INSTALLED REBOOT_PROTECTED "files\scrrun.dll" "$SYSDIR\scrrun.dll" "$SYSDIR"
!insertmacro InstallLib DLL $ALREADY_INSTALLED REBOOT_PROTECTED "files\MSVCRT.DLL" "$SYSDIR\MSVCRT.DLL" "$SYSDIR"

; Reboot
Reboot

The problem with this script is that when the systems reboots, the file oleaut32.dll is missing. I found that MDAC 2.5 tries to upgrade it from its original version. When I use the script above, the upgrade fails and the file is deleted but not replaced with a newer version. This leads to complete crash of the system - no application can be started.

I found that when I change the script to
install_system_files
reboot
install_mdac
reboot
install_app
everything works fine (note that this is basically what the original Visual Basic installer does).

The question I have follows: what's wrong with the first version? And why does the second version work? Is the second version really correct or is there some other problem? I mean some theoretical explanation. I need to be absolutely sure that my scripts work on every system regardless any applications installed etc. So I want a theoretical reason why one or the other script will really work.

Thanks in advance


The MDAC installer already installs oleaut32.dll, so you don't need to install it yourself. I don't know how exactly it got to a situation where you'd be left with no oleaut32.dll. But with more details, like the output of pendmove and the contents of the start-up registry keys, we can find out together.