How to Rebuild the Default Windows REG.DAT File

Last reviewed: December 11, 1997
Article ID: Q80393
3.10 3.11 WINDOWS kbsetup kbole kberrmsg

The information in this article applies to:

  • Microsoft Windows operating system versions 3.1, 3.11
  • Microsoft Windows for Workgroups versions 3.1, 3.11

SUMMARY

During installation of Microsoft Windows, the REG.DAT file is not copied from the original distribution disks. Instead, REG.DAT is built using the Windows Registration Information Editor (REGEDIT.EXE) and the SETUP.REG file (located in the Windows SYSTEM subdirectory) during Setup.

If the REG.DAT file is corrupted, one of the following error messages may be displayed:

   File Manager cannot open or print the specified file.
   Start the application used to create this file, and open
   or print it from there.

   -or-

   There is no application associated with this file. Choose Associate from
   the File menu to create an association.

   -or-

   There is a problem with REG.DAT. Delete REG.DAT and restart Windows.

   -or-

   Setup had a problem with REG.DAT, SHELL.DLL or disk space.

   -or-

   Windows registration database program is not valid

   -or-

   OLE server initialization failed

   -or-

   Windows registration database is not valid

If, for whatever reason, the REG.DAT file is corrupted or deleted, you can rebuild the file using the information below.

MORE INFORMATION

The REG.DAT file contains information about file associations and OLE objects. The Windows 3.1 Setup program calls the Registration Information Editor to add default associations (for Paintbrush, Notepad, and so on) and objects (Packager, Paintbrush, and Sound Recorder).

Rebuilding the REG.DAT File for Applications Included with Windows

You can manually create a new REG.DAT file or restore the defaults by following the steps below.

NOTES

  • Be sure to rename your existing REG.DAT file before you try to rebuild it.
  • These steps assume your Windows directory is on drive C and is named WINDOWS.

  1. Run Program Manager or File Manager.

  2. From the File menu, choose Run.

  3. In the dialog box, type the following:

         regedit /u c:\windows\system\setup.reg
    

    Note: A message appears to confirm that the information has been registered. The database now contains the original registration information that was installed with Windows. To rebuild the REG.DAT file for other applications, see the "Rebuilding the REG.DAT File for Other Applications" section below.

  4. Choose OK.

    Note: You may need to exit and restart Windows in order to see the REG.DAT file displayed in File Manager and execute the following step.

  5. In File Manager, select the REG.DAT file found in the Windows program directory, then choose Associate from the File menu and associate Files with Extension: DAT and REG with REGEDIT.EXE.

    NOTE: When you removed the old REG.DAT file, you also removed your file associations list; therefore, you must choose REGEDIT.EXE using the Browse button.

  6. Exit and restart Windows.

After you have created a new REG.DAT file or restored the defaults, use the following steps to renew the list of applications in the Associate dialog box:

  1. In File Manager, choose Run from the File menu.

  2. In the dialog box, type the following line:

          regedit /u c:\windows\system\setup.reg
    

Rebuilding the REG.DAT File for Other Applications

For applications other than the Windows-based programs included with Windows 3.1, the technique varies for rebuilding REG.DAT. Some applications, such as Microsoft Word 2.0 for Windows, rebuild their entries every time the application is started. Other applications may register themselves only during their setup processes.

NOTE: If you are using Word 2.0 for Windows, make sure to include the path to the Word for Windows program directory and the WW20.REG file located there (for example, C:\WINWORD\WW20.REG) so that the registration database is updated.

If the application includes an .REG file, you can add that information to the registration database. To do so, either:

  • Choose Merge Registration File from the File menu in the Registration Information Editor. Then select the .REG file for the application to be added to the database and choose OK.

    -or-

  • Use the same steps described above, substituting the name of the .REG file. Otherwise, consult the application's documentation or contact your vendor for more information about rebuilding the REG.DAT file.

    -or-

  • Run Windows File Manager and double-click the application's .REG file.

If you need to rebuild the registration database for all your applications, use the following steps:

  1. From the File menu in File Manager, choose Search.

  2. Search for *.REG from C:\. Ensure that the Search All Subdirectories check box is selected before you choose OK.

  3. Run SETUP.REG by double-clicking the file icon or by highlighting it and then pressing ENTER.

  4. Run every other .REG file brought up by the File Manager search (just as you did in step 3).

For instructions about registering Microsoft Office version 4.x applications, query on the following words in the Microsoft Knowledge Base:

   ole and regedit and office

Additional information about Registration Information Editor is available in Windows 3.1 Help.

REFERENCES

"Microsoft Windows Resource Kit for Operating System Version 3.1," Chapter 11, page 360


KBCategory: kbsetup kbole kberrmsg
KBSubcategory: win31 wfw wfwg
Additional reference words: gpf 3.10 3.11
Keywords : wfw wfwg win31 kberrmsg kbole kbsetup
Version : 3.10 3.11
Platform : WINDOWS


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: December 11, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.