Site hosted by Angelfire.com: Build your free website today!
Chapter 37: Windows XP Configuration Files

PreviousChapterContentsGlossaryNext

What Kinds of Configuration Files Does Windows XP Use?

Other than the Registry (described in Chapter 38), most of Windows' control information is stored in text files that you can open with Notepad or any other text editor. Although changing these files is usually a bad idea unless you're quite sure you know what you're doing, looking at their contents is entirely safe--and provides fascinating glimpses into how Windows works.

Making Configuration Files Visible

Most of the control information is stored in hidden, system, and read-only files. Hidden and system files are like any other files, except that they don't normally appear in file listings when you use Windows Explorer to display a folder that contains them. (Any file can be hidden, but only a couple of required files in the root folder of the boot drive are system files.) Read-only files can't be changed or deleted.

You can tell Windows to show you all the hidden files on your computer. In an Explorer window, select Tools | Folder Options and click the View tab. The list of Advanced Settings includes a Hidden Files And Folders category. Click the Show Hidden Files And Folders check box so a check appears. This setting reveals hidden files in all folders, not just the current folder. Hidden files appear listed with regular files, but their icons are paler than regular files. To reveal the hidden files that Windows considers "special," uncheck the Hide Protected Operating System Files (Recommended) check box. Click Yes in the warning dialog box. Click OK when you have finished making changes in the Folder Options dialog box to make the changes active.

You can change a file's hidden or system status by right-clicking the file and selecting Properties. Click the Hidden and Read-only check boxes at the bottom of the Properties dialog box to select or deselect these attributes.

tip We recommend that you leave hidden and system folders and files hidden unless you plan to look at them. They can be distracting during normal work. If you do decide to display them, you can tell hidden and system files from normal files by their dimmed appearance.

What Is %SystemRoot%?

You may see pathnames that include "%SystemRoot%" in a dialog box setting or in a configuration file. SystemRoot is a global system variable that tells Windows where the Windows program is stored. Windows replaces "%SystemRoot%" with the current location of Windows (usually C:\Windows).

Why is this useful? Because if you create a configuration file for your computer and then give it to a friend, your friend's Windows system may be installed somewhere else (for example, F:\Windows on a dual-boot system in which the C: partition is used by a previous version of Windows). Your Windows system could be installed on C: but theirs could be F: or L: or Z:. Using %SystemRoot% in a configuration file allows it to work on any system, regardless of circumstance.

Windows Initialization Files

Since Windows 95, Microsoft has moved most Windows initialization information into the Registry, but Windows still uses two initialization files: Win.ini and System.ini. Some Windows 3.1 applications stored their setup information in individual INI files (initialization files), such as Progman.ini for the Windows 3.1 Program Manager. Other Windows 3.1 programs used sections in the general-purpose Win.ini file.

All INI files have the file extension .ini, and nearly all reside in the folder in which Windows is installed (usually C:\Windows). All INI files have a common format, of which the following is a typical example (it contains configuration information for the WS_FTP file transfer program):

[WS_FTP]
DIR=F:\Program Files\WS_FTP
DEFDIR=F:\Program Files\WS_FTP
GROUP=WS_FTP Pro
INSTOPTS=4

[Mail]
MAPI=1

An INI file is divided into sections, with each section starting with a section name in square brackets. Within a section, each line is of the form parameter=value, where the value may be a filename, number, or other string. Blank lines and lines that start with a semicolon are ignored.

In general, editing the Win.ini or System.ini file is a bad idea, but if you need to do so, use the System Configuration Utility. You can take a look at the contents of the files using this program, too.

note While Windows may not make much use of the Win.ini and System.ini files, third-party software publishers make wide use of application-specific INI files to retain their program settings. Take a peek into the program folders for a few of your applications and you'll almost certainly find an INI file.

The Win.ini File

In Windows 3.1, nearly every scrap of setup information in the entire system ended up in the Win.ini file in C:\Windows, meaning that if any program messed up Win.ini, the system could be nearly unusable. More recent versions of Windows alleviate this situation by moving most configuration of the information into the Registry, but Win.ini is retained to offer support for 16-bit applications. You'll typically find sections for a few of your application programs in Win.ini, plus a little setup information for Windows itself.

You can use Notepad to edit Win.ini, but it's dangerous. Instead, use the System Configuration Utility to edit the Win.ini file.

The System.ini File

In Windows 3.1, the System.ini file in C:\Windows listed all the Windows device and subsystem drivers to be loaded at startup. In Windows XP the vast majority of the driver information is in the Registry, but System.ini still contains driver configuration information for 16-bit applications. Use the System Configuration Utility (rather than Notepad) to edit the System.ini file.

The Registry

The Windows Registry contains all of the configuration information not in an INI file, including the vast majority of the actual information used to control Windows and its applications. Use the Registry Editor to examine and manage the Registry.

PreviousChapterContentsGlossaryNext