Component Checker

Component Checker is designed to determine installed version information and assist in diagnosing installation issues with the Microsoft® Data Access Components (MDAC). This tool runs on the following operating systems: Microsoft Windows® 98, Windows NT® 4.0, and Windows 2000. Only 32-bit and 64-bit platforms are supported. Component Checker includes a predetermined list of MDAC versions, which it uses to analyze the version of MDAC on your computer. For the latest information about Component Checker, or to download newer versions of the tool as they become available, see the Downloads page at www.microsoft.com/data.

MDAC is installed with numerous Microsoft products and also can be redistributed using the redistribution program (MDAC_TYP.exe) found on the Downloads page at www.microsoft.com/data.

Component Checker is a customizable tool that performs the following tasks:

  • Identifies the current MDAC installation on a computer.

  • Creates a series of reports about the files identified for the current MDAC installation.

  • Removes the current MDAC installation after listing .dll conflicts and identifying programs that reference a given .dll.


Running Component Checker

You can run Component Checker using either of two methods:

  1. Basic—Perform a scan or simple analysis of the MDAC files on your computer by using one of the following methods:
    • Run ComCheck.exe from the command line without using any options or command-line switches.

    • Double-click the Component Checker icon in the install directory. This runs the tool without using any options. Then you can perform a variety of simple evaluations using the menus available in the Component Checker window.
  2. Complex—Perform scans or analyses in addition to maintenance activities on your computer's MDAC files. Running Component Checker from the command line allows you to pass a number of options as defined in the section "Command Line Switches." This opens the same Component Checker window, but adds functionality by increasing the number of menu commands.


User Interface

To run Component Checker, double-click its icon or open it from the command line, with or without switch options. Then choose one of three analysis options from the Choose Analysis Type dialog box. The results are displayed in the Component Checker window.

Choose Analysis Type Dialog Box

When executed, the MDAC Component Checker displays the Choose Analysis Type dialog box, which allows you to choose one of three options:

  • Perform analysis of your machine and automatically determine the release version. (Default)

    When selected, this option searches the installed Microsoft Data Access Components on your computer and determines the release version. Because it is possible that some components were installed by different products, the result of this analysis might not be precise. Component Checker presents the version that most closely aligns with all the components.

  • Perform Analysis Against Selected Version

    When selected, this option activates a drop-down list of all MDAC installation versions. These version names are in the ComCheck.ini file and can be customized. For more information about altering the version list, see "Modifying the Current Builds List." Component Checker will perform an analysis on the version selected and then present a list of installation files with error or warning messages.

  • Scan your machine. Do not perform an analysis.

    When selected, this option performs an analysis on the data from the last analysis or snapshot, and presents the MDAC Component Checker window. Any results, errors, or warnings will appear here.

MDAC Component Checker Window

The MDAC Component Checker window consists of two panes that show the results of an analysis: the Tree View pane and the Results pane. Each item in the Tree View pane, when selected, shows specific results in the Results pane. You can modify the Tree View pane slightly by removing ODBC and OLE DB. For more information, see "Customizing the Tree View." Some menu items are dependent on the switches used when running Component Checker from the command line. Each switch is explained in conjunction with the function it supports.


Command Line Switches

Many features of Component Checker can be implemented by running the tool from the command line. Following is a list of switches that invoke these features. Refer to the links in the Operation column to understand the impact of using each feature.

Switch | Operation
/D | Remove the entire set of MDAC components.
/R | Register or unregister COM objects.
/S | Take a snapshot of your installed MDAC version.
/NR | Remove components without specifying a redistribution program. This switch must be used in conjunction with /D. For example, ComCheck.exe /D /NR
/Q | Automatically select an option from the Choose Analysis Type dialog box. For example, ComCheck.exe /Q/S
/REMOVE | Remove MDAC components unattended. This switch must be used in conjunction with the /Q switch. For example, ComCheck.exe /Q/REMOVE
/I | Precedes string containing the name of another .ini file other than the default. The default .ini file name is ComCheck.ini. For example, if you make another .ini file, called ComCheckNew.ini, and then type ComCheck.exe /I ComCheckNew.ini on a command line, the operation uses the named .ini file, not the default.


Customizing Component Checker

Customizing Component Checker allows you greater control in analyzing or manipulating the Microsoft Data Access Components when running the tool. You can configure the tool for a variety of users, and put safeguards in place for each audience. By customizing Component Checker, you can:

  • Modify the list of current versions to prevent actions against versions of your choice.

  • Allow multiple instances of the tool to run concurrently.

  • Alter the user's selection list.

  • Alter the Tree View pane.

  • Provide some degree of internationalization.

  • Control the file list that Component Checker uses for analyzing and deleting components.

File Locations

Component Checker relies on files shipped with it to determine file locations. Most files used for customization are located in <install directory>\ComCheck\Streams. The following table lists the significant files, their locations, and use. Some files exist in multiple locations, or streams, because they control a specific version.

File | Location and description
Comcheck.ini | Root install directory. Contains specialized sections. For more information about using the ComCheck.ini file, see "Modifying Search Paths," "Modifying the Current Builds List," "Modifying the User's Selection List," and "Running Multiple Instances of Component Checker."
AllFiles.txt | Root install directory and Streams\InputData directory. List of file names that Component Checker checks. For more information about using AllFiles.txt, see "Modifying the Input Data Files."
RegistryKeyValue.txt | Root install directory and Streams\InputData directory. List of registry values that Component Checker checks. For more information about using RegistryKeyValue.txt, see "Modifying the Input Data Files."
DeleteExceptionList.csv | Streams directory. List of file names that will not be removed when Component Checker deletes an installation. For more information about using DeleteExceptionList.csv, see "Modifying the Input Data Files."
FileDir.csv | Streams directory. List of file names with path information for locating files. For more information about using FileDir.csv, see "Modifying the Input Data Files."


Modifying the Input Data Files

The input data files for Component Checker control the MDAC files to be analyzed or removed. They also contain a list of registry values. Customizing these files allows greater control over the scope of the tool. The input data files are located in the Streams directory.

AllFiles.txt

The Streams\InputData directory holds AllFiles.txt, which lists the files that are analyzed by Component Checker. This file is used when altering the list to take custom snapshots. Entries can also be generated using the process described in "Building Custom File Lists." Using a text editor, alter the list as appropriate. An example of the partial contents follows:

msjtes40.dll
msdfmap.ini
msdfmap.dll
msadcfr.dll
msdaprst.dll

Note Component Checker also uses AllFiles.txt files in each version-specific Stream directory. These files contain file names specific to that version.

RegistryKeyValue.txt

The Streams\InputData directory holds RegistryKeyValue.txt, which lists the registry entries used by Component Checker. This file is altered when the process described in "Building Custom File Lists" is used. Using a text editor, alter the list as appropriate. An example of the partial contents follows:

FullRegistryPath
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\ADODB.Command.2.0
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\ADODB.Connection.2.0
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Interface\{00000266-0000-0010-8000-00AA006D2EA4}
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Interface\{00000400-0000-0010-8000-00AA006D2EA4}
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{039EA4C0-E696-11d0-878A-00A0C91EC756}

Note Component Checker also uses RegistryKeyValue.txt files in each version-specific Stream directory. These files contain file names specific to that version.

DeleteExceptionList.csv

DeleteExceptionList.csv contains a list of files that will not be removed when Component Checker removes an installation. There is only one version of this file, and it resides in the Streams directory. Use caution when altering this list because unpredictable results can occur if the wrong file is removed. For more information about removing an MDAC installation, see "Removing the Current Version of MDAC." An example of the partial contents of DeleteExceptionList.csv follows:

FullFileName
ADVPACK.DLL
ASYCFILT.DLL
CTL3D32.DLL
EXPSRV.DLL
MFC30.DLL
MSVCIRTD.DLL
msvcrt.dll

FileDir.csv

FileDir.csv contains a list of files and path information to locate the files that Component Checker analyzes. There is only one version of this file and it resides in the Streams directory. An example of its partial contents follows:

FullFileNameDir
msader15.dll\Program Files\Common Files\System\ADO\
msado15.dll\Program Files\Common Files\System\ADO\
MSADOR15.DLL\Program Files\Common Files\System\ADO\
msadrh15.dll\Program Files\Common Files\System\ADO\
MSADCE.DLL\Program Files\Common Files\System\msadc\
MSADCER.DLL\Program Files\Common Files\System\msadc\


Modifying Search Paths

ComCheck.ini contains a Search Directories section that specifies where Component Checker searches for MDAC files. This gives administrators more control of the tool, allowing them to analyze or remove explicit installations. This section also can be useful for user-initiated diagnosis. Here is an example of the Search Directories section of ComCheck.ini:

[SearchDirectories]
%WinDIR%\System32\MNI\0401

The WinDIR variable is mapped to the appropriate string based on its environment variable setting. This is true for all environmental variables. Therefore, you can define your own settings and set them before running the program.


Modifying the Current Builds List

The CurrentBuilds section of the ComCheck.ini file contains the name of the string that you see in the initial drop-down list in the Choose Analysis Type dialog box. You can remove MDAC-specific entries so that they will not appear in your list. You also can delete the associated subdirectories of the Streams subdirectory within your install directory. Here is an example of the CurrentBuilds section of ComCheck.ini:

[CurrentBuilds]
2.1 GA=2.1 GA
2.1 SP1=2.1 SP1
2.1 RTM=2.1 RTM
2.0 SP2=2.0SP2
2.0 SP1=2.0SP1


Modifying the User's Selection List

The User Selection section of the ComCheck.ini file contains a list that controls the default selections presented to the user in the Component Checker drop-down list, as shown here:

[User Selection]
SelectedBuildDescription=2.0 SP2
BuildDirectory=2.0SP2
OptionSelected=SelectBuild
OptionTakeSnapshot=SaveCustom
WindowTitle=MDAC

WindowTitle specifies the custom name that appears in the title bar of the Component Checker window. SelectedBuildDescription, BuildDirectory, and OptionSelected are saved settings that are based on the last analysis performed.


Running Multiple Instances of Component Checker

The Custom Settings section of the ComCheck.ini file contains a setting that allows multiple instances of the program to be run. Set MultipleInstances to 1 to allow multiple, concurrent instances of Component Checker. Following is an example of the Custom Settings section of ComCheck.ini:

[Custom Settings]
MultipleInstances=0


Modifying the Version-matching Algorithm

The Custom Settings section of the ComCheck.ini file contains an AlgorithmType parameter, which indicates the type of algorithm used to determine the version of MDAC on a computer. A value of 0 means that the files contained in BuildGuess.csv are used to determine the MDAC version based on each file's version. For each built version listed in the CurrentBuilds section, the program attempts a direct match on the version number. It counts the number of direct matches for each snapshot of a built version, and the built version with the greatest number of matches is the one that is returned. A value of 1 means that, for each of the builds listed in the Current Builds section, the program counts the number of errors for all indicated parameters in the build. The snapshot of a built version with the lowest number of errors is the one that is returned.

[Custom Settings]
AlgorithmType=0


Customizing the Tree View

The Custom Settings section of the ComCheck.ini file contains two settings for enabling and disabling the ODBC and OLE DB trees in the Tree View pane of the Component Checker window. A value of 1 enables each view, meaning the tree will appear in the Tree View pane. A value of 0 disables the view.

[Custom Settings]
EnableOLEDBView=1
EnableODBCView=1


Building Custom File Lists

Building custom file lists provides a way to analyze any other installation on your computer. It is commonly used when taking custom snapshots, and can be useful when another version of MDAC is installed—for instance, one containing a software patch. On your computer, run ComCheck.exe to verify that a clean image exists. If not, then restore a clean image as described in "Removing the Current Version of MDAC." Perform the following steps in order:

  1. Save the directory information for future use or restoration. On a command line, type dir /s > c:\temp\AllClean.txt

  2. Save the registry information for future use or restoration.
    • Using Regedit, save the HKEY_LOCAL_MACHINE\SOFTWARE\Classes section to a file such as ClassesClean.txt.

    • Using Regedit, save the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft section to a file such as MicrosoftClean.txt.
  3. Save all three files (AllClean.txt, ClassesClean.txt, and MicrosoftClean.txt) to a directory on another computer.

  4. Edit all three files by replacing the period (.) with a dual at sign (@@) in order to prevent problems running WinDiff.

Note Steps 2 through 4 need to be done only once.

  5. Install the desired version of MDAC.

  6. Gather the directory and registry information necessary to compare the changes.
    • On a command line, type dir /s > c:\temp\All<MDAC Version Number>.txt

    • Using Regedit, save the HKEY_LOCAL_MACHINE\SOFTWARE\Classes section to a file such as Classes<MDAC Version Number>.txt.

    • Using Regedit, save the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft section to a file such as Microsoft<MDAC Version Number>.txt.
  7. Save all three files (All<MDAC Version Number>.txt, Classes<MDAC Version Number>.txt, and Microsoft<MDAC Version Number>.txt) to a directory on another computer.

  8. Edit all three files by replacing the period (.) with a dual at sign (@@) in order to prevent problems running WinDiff.

Note Steps 7 and 8 need to be done only once.

  9. For each of the following files, run WinDiff and save the compared files as indicated in the following table.
    Original file | Resulting WinDiff file for compare
    All<MDAC Version Number>.txt | All<MDAC Version Number>.cmp
    Classes<MDAC Version Number>.txt | Classes<MDAC Version Number>.cmp
    Microsoft<MDAC Version Number>.txt | Microsoft<MDAC Version Number>.cmp

  10. Parse each of the .cmp files to hold the file names and registry keys for each of the three files, as shown here:
    <! 02/02/99  12:00a               160,016 MSLTUS40.DLL
  11. Sort the files using the command line:
    sort <All<MDAC Version Number>.cmp       > All<MDAC Version Number>.sor
sort <Classes<MDAC Version Number>.cmp   > Classes<MDAC Version Number>.sor
sort <Microsoft<MDAC Version Number>.cmp > Microsoft<MDAC Version Number>.sor
  12. Remove any duplicate entries from the .sor files.

  13. Rename "All<MDAC Version Number>.sor" to "AllFiles.txt".

  14. Concatenate the remaining two .sor files into one file and call it "RegistryKeyValue.txt".

  15. Reduce the number of lines in RegistryKeyValue.txt to between 75 and 130.

  16. Copy AllFiles.txt and RegistryKeyValue.txt to the ComCheck\Streams\InputData directory.

  17. Open Component Checker and select the third option in the Choose Analysis Type dialog box: "Scan your machine. Do not perform an analysis." Click OK.

  18. Close Component Checker.

  19. Copy the InputData directory to a new location and rename it.

  20. Copy the renamed directory to ComCheck\Streams.

  21. Edit ComCheck.ini in your install directory:
    • Add two lines in the [CurrentBuilds] section as follows:
      <your version descriptor>
<name of the subdirectory you have selected>

      For example, if you created a new directory for the "5.0" version and named it "5.0", you might enter the following into the ComCheck.ini file:

      5.0 Retail
5.0

      These entries will appear in the drop-down list in the Choose Analysis Type dialog box when you open the application again.


Registering or Unregistering COM Objects

To register or unregister a COM object

  1. Run ComChecker.exe from the command line and use the /R switch. The Choose Analysis Type dialog box appears.

  2. Choose any type of analysis and click OK.

  3. Within the COM Details view, click any COM object in the Component Checker window. Select Register or Unregister by right-clicking in the pane or selecting the option from the Edit menu.


Analyzing MDAC Installation Information

Component Checker is able to analyze MDAC installation information on your computer or information retrieved from another computer.

With Component Checker, you can analyze Microsoft Data Access Components in the following ways:

  • Determine the MDAC version on your computer

  • Show MDAC components in use

  • Rerun an analysis

  • Analyze information from another computer


Determining the MDAC Version on Your Computer

  1. Run ComCheck.exe, either from the command line or by double-clicking its icon. The Choose Analysis Type dialog box appears.

  2. Select "Perform analysis of your machine and automatically determine the release version. (Default)" and then click OK.

The program attempts to determine the version of MDAC on your computer based on versions of the core MDAC files it finds. If a given snapshot has more version matches than any other version, the program notifies the user with a "closest version detection" message. Component Checker uses this version information to complete its analysis.

If multiple matches exist on your computer, Component Checker displays a "multiple version detection" message. You must then run the analysis against a selected version in the Choose Analysis Type dialog box.


Showing Components in Use

Use this feature to predict the success when you attempt to remove Microsoft Data Access Components. This is easier than repeatedly attempting the removal process, only to find that critical components are in use.

  1. Run ComCheck.exe, either from the command line or by double-clicking its icon. The Choose Analysis Type dialog box appears.

  2. Select any type of analysis and then click OK.

  3. From the View menu, click Files and Registry settings in use. When Component Checker completes the analysis, the Summary Report, accessible from the Tree View pane, will list all components in use. Applications or services running on your computer will be flagged as "file in use by another component" by the tool.


Rerunning an Analysis

Component Checker can be used to run an analysis repeatedly, for instance during a troubleshooting or test scenario. When you run Component Checker from the command line using the /Q switch, the tool will automatically analyze your computer using the selection you last chose in the Choose Analysis Type dialog box.

To rerun an analysis manually:

  1. Run ComCheck.exe, either from the command line or by double-clicking its icon. The Choose Analysis Type dialog box appears.

  2. Select any type of analysis and then click OK.

  3. Press F5, or from the View menu, click Refresh. The Choose Analysis Type dialog box appears.

  4. Run the same analysis again.


Analyzing Information from Another Computer

To view the MDAC version data from another computer, the remote user must open Component Checker on the remote computer and send the resulting files to the person performing the analysis. The analyst then accesses those remote files on the local computer using Component Checker.

Remote users can determine the MDAC release version on their computers by following the steps in "Determining the MDAC Version on Your Computer." After running the analysis again, select the version number that most closely matches the version on the remote computer. Save the results by opening the File menu and clicking Save. The Save dialog box appears.

Select Save all the data and then click OK.

Component Checker will save the computer's current state information in text files and report the directory into which they were saved. The remote user can then send all the files in the stated directory to the analyst.

The analyst copies the saved files from the remote computer into a directory created for that purpose, and then performs the following steps:

  1. Open Component Checker. The Choose Analysis Type dialog box appears.

  2. Select any option and then click OK. (The option that takes the least amount of time is Scan your machine. Do not perform an analysis.) The Component Checker window appears.

  3. From the File menu, click Open. The Open Directory containing data from another machine dialog box appears.

  4. Open the directory that contains the data-analysis files from the remote computer. The Open Directory containing data from another machine dialog box appears again, listing the files in the selected directory.

  5. Select any file in that directory and click OK to open it in the Component Checker window.


Taking a Snapshot of Your Installed MDAC Version

Component Checker can take a snapshot of the results of any analysis and save that snapshot for future reference. A snapshot is simply a set of .csv files that store the data for a particular version of released MDAC components. You can take a snapshot by analyzing a specific MDAC version and saving the .csv files to a specified directory.

  1. Run Component Checker from a command line using the /S switch. The Choose Analysis Type dialog box appears. The option automatically selected is Scan your machine. Do not perform an analysis. When you click OK, a dialog box by the same name appears.

  2. Select Save data for later use, i.e., create your own snapshot. In the text box, type a name for your snapshot. This name will be displayed in the Choose Analysis Type dialog box so that it can be selected for future comparisons.

    In the drop-down list, select the version that most closely matches your desired snapshot, whether it is from your computer or another computer as created from the procedures described in "Analyzing Information from Another Computer."

  3. Click OK. The snapshot will be created.


Removing the Current Version of MDAC

If it becomes necessary to remove the current version of MDAC, Component Checker provides a safe means to do so without causing system corruption. Microsoft Data Access Components are system components and should not be removed from the operating system manually. Removing components by any other means is not recommended or supported. Component Checker handles removal tasks as reconfiguration. Therefore, after the removal is complete, Component Checker installs MDAC using the identified redistribution program (typically named MDAC_TYP.exe).

Warning If MDAC is not installed on your computer and you attempt to remove it, you will get unpredictable results.

Component Checker will reconfigure Microsoft Data Access Components on your computer by first removing the current MDAC installation. This includes the removal of system .dlls and other critical .dlls, registry entries, and COM objects. Component Checker contains an exclusion list of critical system .dlls such as OLEAUT32, which it will not remove.

Note Component Checker will not remove files that are listed in DeleteExceptionList.csv, located in the \Streams subdirectory of the Component Checker installation directory. You can edit this text file to customize files that should not be removed. For more information about editing this file, see "Modifying the Input Data Files."

The removal process will list .dll conflicts prior to MDAC removal, which will identify which programs reference specific .dlls. Make a note of these.

When reinstalling the Microsoft Data Access Components, use a valid redistribution program. If you run Component Checker using both the /D and /NR switches, Component Checker will not force you to reinstall MDAC.

To complete reconfiguration, you must identify the location of the MDAC redistribution program, terminate all processes using Microsoft Data Access Components, and run Component Checker from the command line using the /D switch. Follow these steps to do so:

  1. Obtain, but do not run, the current MDAC redistribution program, either from your own source or download it from www.microsoft.com/data/download.htm.

  2. Run Component Checker from a command line using the /D switch. For example, type comcheck.exe /D. The Choose Analysis Type dialog box appears. (If you do not want to run the MDAC redistribution program at the end of the removal process, use both the /D and /NR switches.) Attempting to run this process without MDAC installed on your computer is unsupported and results are unpredictable.

  3. Select Scan your machine. Do not perform an analysis. Click OK. Component Checker will scan your latest snapshot or analysis, and return the results.

  4. In the Component Checker window, open the File menu and click Reconfigure MDAC components. If you have not terminated all MDAC processes, a warning message appears, instructing you to terminate the processes and rerun the scan option. To do so, open the Windows Control Panel and double-click Services. If all processes are closed, a confirmation message appears.

  5. The following warning message appears: "This command will reconfigure all Microsoft Components! Are you sure you want to do this?" Click Yes.

  6. A dialog box appears, stating that you must identify the location of the redistribution program. Click OK. The Location of redist program dialog box appears. Select the directory where the MDAC redistribution program is located, either on your computer or on the network.

  7. Click Open. The removal process begins. Once completed, a message appears stating that MDAC has been removed. (If nothing happens when you click Open, click Cancel, verify that the redistribution program is accessible, and repeat the steps. You might have to copy the redistribution program to your local drive.)

  8. Click OK. The redistribution program will install the selected version of MDAC. When the installation is complete, Component Checker will take control of the process and display a success or error message. If successful, the process is complete; if not, you must resolve the problem and repeat the steps above.


Removing the Current Version of MDAC Unattended

If it becomes necessary to remove the current version of MDAC, Component Checker provides a safe means that prevents system corruption. For a complete discussion of the removal process, see "Removing the Current Version of MDAC."

Component Checker has the ability to run the removal process without user intervention. It uses the last analysis that was run on the computer as the version to remove. This information is stored and can be modified in the SelectedBuildDescription section of ComCheck.ini. For more information about modifying this section, see "Modifying the User's Selection List."

To remove the current version of MDAC unattended

  • Run Component Checker from a command line using the switch /D/REMOVE/Q. For example, type ComCheck.exe /D/REMOVE/Q

Warning Attempting to run this process without MDAC installed on your computer is unsupported and results are unpredictable.

Component Checker runs in the background. No other version of MDAC will be installed.


Choose Analysis Type Dialog Box


Closest Version Detection Message


Location of redist program Dialog Box


Multiple Version Detection Message


Open Directory Dialog Box (directory list)


Open Directory Dialog Box (file list)


Component Checker Window


Save Dialog Box


Scan your machine Dialog Box