Windows: Maximum Valid Size for REG.DAT and .INI Files

Last reviewed: November 23, 1994
Article ID: Q78346
The information in this article applies to:
  • Microsoft Windows operating system versions 3.0, 3.0a, 3.1, 3.11
  • Microsoft Windows for Workgroups versions 3.1, 3.11

SUMMARY

The maximum valid size for a REG.DAT or .INI file is 64 kilobytes (K). In some instances, however, problems occur when these files are greater than 32K.

MORE INFORMATION

If an application uses the standard Windows application program interface (API) calls to access the .INI files, the limit is 64K. Examples of these standard API calls are GetPrivateProfileString() and WritePrivateProfileString().

If, for example, the WIN.INI file exceeds 64K, the information beyond 64K is ignored, and Windows may behave unpredictably--system configuration changes may not be implemented, fonts may be missing, printer information may be missing, and default information from applications may not be saved.

If an application uses a SIGNED INT instead of an UNSIGNED INT to point to the file size, the size limit for these files is 32K. Some third-party applications may be unable to read .INI files, including the WIN.INI file, if they are larger than 32K.

NOTE: Page 89 of the "Microsoft Windows Resource Kit" (WRK) for version 3.0 incorrectly states that the maximum size of the WIN.INI file is 32K.

SysEdit

The Microsoft Windows SysEdit program provided with Windows cannot correctly edit a file larger than 30,000 bytes. If SysEdit does load a file larger than 30,000 bytes, you can delete text, but you cannot type any text until you reduce the file size to 29,999 bytes or fewer.

The largest file SysEdit can load is between 30,000 bytes and 53K, depending on your system. If you load a file large than 30,000 bytes, you may receive the following error message:

   <Filename>
   Cannot open this file.

If the large file you are trying to open is the WIN.INI file, only part of it may load, and you may receive the following two error messages:

   C:\CONFIG.SYS
   Cannot open this file

   C:\AUTOEXEC.BAT
   Cannot open this file


KBCategory: kbtool kbdocerr
KBSubcategory: wfw wfwg win30 win31
Additional reference words: 3.00 3.00a 3.0 3.0a 3.10 3.1 3.11 documentation
error docerr


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: November 23, 1994
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.