HOWTO: Distribute ADO with the Application Setup WizardID: Q184265
|
Redistributing ADO/DB version 1.5 correctly and safely with the Visual Basic Application Setup Wizard is done by SHELLing out and running the MDACRDST.EXE.
This article assumes you have ADO 1.5 already installed on your machine.
ADO 1.5 is included with the Microsoft Data Access Components (MDAC)
version 1.5, the Internet Explorer 4.0 Client SDK, the OLE DB 1.5 SDK,
Internet Information Server 4.0, and as a standalone executable from the
following Web site:
http://www.microsoft.com/data
http://www.microsoft.com/data/download.htm
\program files\common files\system\ado
\program files\common files\system\ole db
'Variable used to string path and EXE together.
Dim progname As String
'Global gstrDestDir As String 'dest dir for application files
'gstrDestDir is defined earlier in frmsetup1.bas
'Uncommenting the line below hides the file on the user's machine.
'This may be desired if it will be left on the user's machine after
'the install. Note, the application's Uninstall routine will remove
'this file, though.
SetAttr gstrDestDir & "mdacrdst.exe", vbHidden
'All the calls below invoke MDAC Setup in a Quiet mode, meaning no
'choices or options for the user to select or choose, "Setup.exe /Q".
'The first two methods provide a minimum of a standard setup
'background and thermometer bar window showing the progress of the
'install. The first install methods are the most user-friendly.
'When setup is called with "/Q0" it exits with a Message box
'notifying the user it completed successfully. It also tells the
'user if it is necessary to reboot the system to complete the
'installation and gives the choice to reboot now or later.
progname = gstrDestDir & "mdacrdst.exe /q /c:" & Chr(34) & _
"setup.exe /Q0" & Chr(34) & ""
'Setup called with "/Q1" is the same as "/Q0" but exits without any
'notification to the user that it installed successfully. It also
'does not provide any notification that it is about to reboot the
'system - if necessary.
'progname = gstrDestDir & "mdacrdst.exe /q /c:" & Chr(34) & _
"setup.exe /Q1" & Chr(34) & ""
'When called with "/QT", almost everything is hidden and almost zero
'feedback is given to the user that an install is occurring or when
'it is finished. This method is probably the least favorable.
'progname = gstrDestDir & "mdacrdst.exe /q /c:" & Chr(34) & _
"setup.exe /QT" & Chr(34) & ""
'Spawns the MDAC installation.
Shell progname, vbNormalFocus
Keywords : kbADO kbMDAC kbVBp500
Version : WINDOWS:1.5,5.0
Platform : WINDOWS
Issue type : kbhowto
Last Reviewed: May 11, 1999