Microsoft KB Archive/122964

From BetaArchive Wiki

How to Rebuild the Reg.dat File and Re-register Applications


The information in this article applies to:

  • Microsoft Access 2.0
  • Microsoft Excel for Windows, versions 5.0, 5.0c
  • Microsoft Office for Windows, versions 4.0, 4.2, 4.3
  • Microsoft PowerPoint for Windows, versions 4.0, 4.0a, 4.0c
  • Microsoft Publisher versions 2.0, 2.0a
  • Microsoft Word for Windows, versions 6.0, 6.0a, 6.0c
  • Microsoft Works for Windows, version 3.0
  • Microsoft Windows 3.11
  • Microsoft Windows for Workgroups versions 3.1, 3.11


Windows uses the registration database (Reg.dat) to store information about OLE-compliant applications. Information in the Reg.dat file pertaining to a specific application may be incorrect, or the entire Reg.dat file may become corrupted.

This article explains how to rebuild the entire Reg.dat file and how to re-register individual applications (including specific Microsoft applications).

You should rebuild the Reg.dat file only be done when other troubleshooting measures have proven unsuccessful, and when the nature of the problem suggests Reg.dat difficulties.

If the problem affects only one application, re-register an individual application before rebuilding the entire Reg.dat.

If the problem you are trying to solve is OLE-related, and other troubleshooting methods haven't worked, rebuild the entire Reg.dat file.

It is not clear what causes corrupt Reg.dat files.

The "More Information" section of this article is divided into the following subsections:

  • How to Rebuild the Reg.dat File Completely
  • How to Re-Register Applications
  • How to Re-Register Individual Microsoft Applications

    • Microsoft Access 2.0
    • Microsoft Excel 5.0
    • Microsoft Office 4.2
    • Microsoft Office 4.3 Shared Applications
    • Microsoft PowerPoint 4.0
    • Microsoft Publisher 2.0
    • Microsoft Word 6.0
    • Microsoft Works 3.0
  • Background: How Applications Register Automatically



To completely rebuild the Reg.dat file, perform the following steps:

  1. Rename the Reg.dat file in your Windows folder to Regdat.old.
  2. In the Win.ini file, disable each line of the [EMBEDDING] section by inserting a semicolon (;) at the beginning of each line. This prevents Windows from rebuilding a new Reg.dat file based on this section. These remarked lines may be removed once the applications have been re-registered (refer to the section below entitled HOW TO RE-REGISTER APPLICATIONS).

Once all changes have been made, click Save on the File menu. Then, click Exit on the File menu.

  1. Quit and then restart Windows.
  2. In Program Manager, click Run on the File menu. In the Command Line box, type the following command:
  3. Click OK.
  4. Erase the contents of the Command Line box. In it, type the following command:
  5. To begin the troubleshooting portion of this procedure, register only the applications that were having problems. Use the steps in the section of this article titled "How to Re-register Individual Microsoft Applications."

If the problems disappear after the Reg.dat file has been rebuilt and the concerned applications have been re-registered, you can assume that a corrupted Reg.dat file was the problem and that the problem has been solved. Continue to re-register the remaining applications.


The best method for re-registering an application is to reinstall it. Many applications have a Setup icon in Program Manager in the program group where the application icon is located. To reinstall these applications, double- click each icon and choose the reinstall option. If there is no Setup icon, insert the first disk of the application's program disks, and run Setup from the disk. Choose the Reinstall option.

See the following section for instructions on how to re-register Microsoft applications.


Associate .reg Files with Regedit.exe

For an application to automatically register itself when the .reg file is double-clicked, files with the .reg extension must be associated with the REGEDIT program. To ensure that association, use the following steps:

  1. Start File Manager. On the File menu, click Associate.
  2. In the Associate dialog box, type "reg" (without the quotation marks) in the Files With Extension box.
  3. Use the scroll bar below the Associate With box to select Registration Entries (Regedit.exe). If it is not in the list, click Browse and select Regedit.exe from the files in the Windows folder. Click the OK button.

Microsoft Access 2.0

To register Microsoft Access, start Microsoft Access. Microsoft Access registers itself automatically when run, so it is not necessary to merge its .reg files into the registration database.

Microsoft Excel 5.0

To register Microsoft Excel, start Microsoft Excel. Microsoft Excel registers itself automatically when run, so it is not necessary to merge its .reg files into the registration database.

However, if there is no current entry for Microsoft Excel in the registry and you allow it to self-register, it may include incorrect information that could cause erratic behavior of the OLE server. To avoid this, reinstall Microsoft Excel.

An alternative method involves the following two steps:

  1. Follow the steps in the "Associate .reg files with Regedit.exe" section located above. Locate the Excel5.reg file in the Microsoft Excel folder and double-click it.
  2. In File Manager, start Excel.exe.

Microsoft Excel is now properly registered.

Microsoft Office 4.2

Microsoft Office 4.2 and Microsoft Office 4.3 use .reg files that contain variable path statements for their applications. Depending upon your directory structure, these may be incorrect. To merge these .reg files, open them and edit them first.

You will find the following .reg files in different locations depending on the media and size. They are on Disk 1 of non-DMF versions, varying disk numbers of DMF disks and in the Setup.adm\Disk1 folder of the Office 4.2-CD and 4.3-CD:



To use these files to register the applications, follow these steps:

  1. Copy the appropriate .reg file to your hard disk. (You can copy the file to any folder that you want.)
  2. Open the .reg file in Notepad or any text editor.
  3. Search the file for all occurrences of the following text string

          <Windows Dir> 

    and change these occurrences to the actual path of the Windows directory. For example, if the line as it appears in the .REG file is

          HKEY_CLASSES_ROOT\MSOrgChart.1\protocol\StdFileEditing\server =

    and your Windows directory is D:\WIN31, change the line to read:

          HKEY_CLASSES_ROOT\MSOrgChart.1\protocol\StdFileEditing\server =
  4. If you are running the shared OLE applications from a network server, you must include the whole path to the .exe file. (You may use the universal naming convention [UNC] for this.) For example, if you are running Organization Chart from a server called \\Server1\Share (which you routinely map to your W: drive), you should modify the above line to read:

          HKEY_CLASSES_ROOT\MSOrgChart.1\protocol\StdFileEditing\server =


          HKEY_CLASSES_ROOT\MSOrgChart.1\protocol\StdFileEditing\server =
  5. Save the file. Exit your text editor.
  6. If you have associated .reg files with Regedit.exe (see the steps outlined under "Associate .reg files with Regedit.exe" above), you can now merge this updated .reg file by double-clicking it in File Manager. Alternatively, on the File menu in Program Manager, click Run, type the following line and press ENTER:

Microsoft Office 4.3 Shared Applications

See the instructions for Microsoft Office 4.2 provided above.

Microsoft PowerPoint 4.0

To register Microsoft PowerPoint, start Microsoft PowerPoint. Microsoft PowerPoint registers itself automatically when run, so it is not necessary to merge its .reg files into the registration database.

Microsoft Publisher 2.0

If you have installed any of the Office applications after installing Publisher, double-click the Mspub.reg file. You may need to first follow the instructions in the "Associate .reg files with Regedit.exe" section above.

To register the other applications, use the method outlined in the "Office 4.2" section above.

If you did not install Office, double-click each of the following .reg files:

      Artgalry.reg      Mspub.reg           Wordart2.reg
      Msdraw.reg        Note-it.reg 

Microsoft Word 6.0

To register Word, start Word. Word registers itself automatically when run, so it is not necessary to merge its .reg files into the registration database.

Microsoft Works 3.0

Works for Windows writes valid .reg files to the hard disk if the default path choices were not changed during installation. These can be used as-is to register the applications in the Reg.dat file. Follow the steps outlined under "Microsoft Publisher 2.0" above.

If Works for Windows is installed to any folder other than the default folder, or if you have installed any of the Office applications after Works was installed, you will need to edit the .reg files before merging them using steps similar to those outlined above.

For additional information about how to register Works for Windows 3.0, please see the following article in the Microsoft Knowledge Base:

Q111772 Manually Registering Works for Windows 3.0


Most applications register themselves automatically the first time they run. Some applications even include a .reg file that you can double-click or merge in the Registration Editor should you ever want to re-register the application.

Some of these .reg files include a placeholder for the Windows folder path. When you run the application's setup program, the setup program replaces the placeholder with the correct Windows path. If you double-click or merge one of these files, the placeholder, and not the actual Windows path, is placed in the Reg.dat file.

Registration methods for Microsoft applications

Application                 .reg file not   .reg file     .reg file may
                            needed (self    has correct   have invalid
                            registering)    path          default path

Windows Accessories
Paintbrush, Notepad,                        Setup.reg
Write, Cardfile, Sound,

OLE files                                   Ole2.reg

Office Applications:

Microsoft Access 2.0        Msaccess.exe
Microsoft Excel 5.0         Excel.exe*      Excel5.reg*
Microsoft PowerPoint 4.0    Powerpnt.exe                  Pp4.reg
Microsoft Word 6.0          Winword.exe

Office Shared Applications:

ClipArt Gallery             Artgalry.exe                  Artgalry.reg
Draw 2.                                                   Msdraw.reg
Equation Editor 2.0                                       Eqnedit2.reg
Graph 5.0                   Graph5.exe                    Graph5.reg
Media Player                Mplayer.exe
Organization Chart 1.0      Orgchart.exe                  Orgchart.reg
WordArt 2.0                                               Wordart2.reg

Home product files:

Works 3.0                                                 Msworks3.reg
   Art Gallery                                            Artgalry.reg
   MS Draw                                                Msdraw.reg
   Note-It                                                Note-it.reg
   WordArt                                                Wordart2.reg

Publisher                                                 Mspub.reg
   Art Gallery                                            Artgalry.reg
   MS Draw                                                Msdraw.reg
   Note-It                                                Note-it.reg
  • A combination of merging the .reg file and running the application may be needed to properly install Microsoft Excel 5.0. Refer to the "How To Re-register Individual Microsoft Applications" section above.

Additional query words: winword winppt power point powerpt word6 word7 word95 rebuild pub reregister 2.00a 4.00a 4.00c 5.00c 6.00a 6.00c

Keywords : kbole kbusage
Issue type : kbhowto
Technology :

Last Reviewed: November 3, 2000
© 2001 Microsoft Corporation. All rights reserved. Terms of Use.