Zeus Tech Note
Windows INI and Registry Files
(This document last revised May 7, 1997)
Copyright © 1996-1997. Zeus
Productions. All Rights Reserved.
Written by Bruce A. Epstein
Q. What are "INI" files?
INI files (pronounced "Eye-En-Eye"
or sometimes "Inny") are common Windows initialization
files, which always have an ".INI" extension, and are used to
store configuration information for application programs. Windows INI files
are used under Windows 3.1 and Windows 95, but generally not the Macintosh.
Q. What INI files does Windows use?
Windows itself uses several special INI files.
Most notably, the WIN.INI (or "Win-Inny"
or "Windows INI" file) stores information about the installed
programs and the OS itself.
Most INI files are stored in the Windows or Windows\System directory, but
they are also often located in the same folder as the associated application.
zOpen for Windows will locate applications
based on the entries in the WIN.INI file or the Windows Registry file.
Q. What is the Windows Registry File?
The Windows Registry File
is system configuration file that stores information about the Windows setup
including file types and their associated
applications. It largely replaces the WIN.INI
file used under Windows 3.1. (The Registry file exists under Windows 3.1,
but is not used as heavily as it is under Windows 95).
zOpen for Windows will locate applications
based on the entries in the WIN.INI file or the Windows Registry file.
Q. How do I use "INI" files?
Many applications store configuration information
in INI files that affect how the application runs. These files are typically
named the same as the application (the EXE file), but with an INI extension.
For example, DIRECTOR.EXE reads information from the DIRECTOR.INI file,
and
In many cases you do not need to explicitly create or modify INI files.
Many installers will create or modify the WIN.INI or other INI files as
necessary. You may wish to inspect an INI file to see what sort of information
is stored therein, or even to modify an INI file to change the behavior
of an application. For example, QuickTime for Windows reads configuration
parameters out of the QTW.INI file, which is modified indirectly via the
QuickTime Control Panel.
zLaunch for Windows allows you to
pass parameters using an INI file as well. The name of the INI file is specified
when you start zLaunch.
Q. What INI files does Director use?
During development, Director itself reads
configuration information from the DIRECTOR.INI
file. This file must be renamed to match the name of your projector, but
with an "INI" extension, for distribution with a projector.
Director for Windows version 3.1.3 and higher also read information from
the LINGO.INI file when a projector is started. As of version 5, Director
for Macintosh will read information from the LINGO.INI file, but this is
unusual for a Macintosh application.
Refer to the TechNote, "The
DIRECTOR.INI and LINGO.INI Files" for tips on using and configuring
Director's INI files.
Q. What is the format of an INI file?
INI files are simple ASCII
text files and can be created in any text editor, such as NotePad
or WordPad. If using a fancier
editor, such as MS-Word, be sure to
save the file in "Text-Only" or similar format.
Every INI file has a standard format. An INI file should contain one or
more "sections", each indicated by a section heading
enclosed in brackets.
A typical section may look like this:
[sectionName]
param1 =string
param2 =string
Such as:
[WAOL]
AOL=c:\AOL\
The Windows INI File (WIN.INI)
The WIN.INI file is one of the most important Windows INI files. It stores
information about the installed programs and the OS itself.
Many applications create one or more section headings within the WIN.INI
file during their installation process. If so, you can check the WIN.INI
file (which is always in a known location) to locate the directory in which
other application are installed.
The WIN.INI file also contains a list of extensions and the application
with which they are associated.
For example, these lines associate HTM files and PDF files with Netscape
Navigator and Acrobat Reader respectively.
[Extensions]
HTM=C:\NETSCAPE\PROGRAM\NETSCAPE.EXE ^.HTM
PDF=C:\ACROREAD\ACROREAD.EXE ^.PDF
Q. Is there some way to read and write INI files?
For any given INI file, from C, you can use Windows' getProfileString()
and setProfileString()
functions. From Lingo, Zeus sells a
utility ti read and write INI files.
The Windows Registry File
The Windows Registry File is system configuration file that stores information
about the Windows setup including file types and their associated applications.
It largely replaces the WIN.INI file used under Windows
3.1. (The Registry file exists under Windows 3.1, but is not used as heavily
as it is under Windows 95).
The Windows Registry file is a superset of the information in the WIN.INI
file.
Under Windows 95, to examine the Registry file with the Registry Editor:
Select "Run...
" from the Start
Menu
, and type "RegEdit
"
(omit the quotes and press RETURN).
This will open the Registry Editor Window, which looks like the File Explorer,
and shows a series of folders. Double-click on the "HKEY_CLASSES_ROOT"
folder. Inside, it shows all of the file extensions and file types that
are associated with various applications. Typically, an extension, such
as ".htm" is associated with a file type such as "htmlfile".
The file type is, in turn, associated with an application.
Under Windows 3.1, to examine the WIN.INI file with the System Editor, select
"Run..." from the Program Manager file menu, and type "sysEdit.exe"
(omit the quotes and press RETURN). This will open the WIN.INI file, in
addition to the config.sys and autoexec.bat files. Scroll down in the WIN.INI
file until you find the [Extensions] section which lists the file associations.
Typically, an extension, such as ".htm" is associated with a web
browser, for example.
Home (Spotlight) | Table
of Contents | Links | Contact
Info
Place an Order | Products
for Sale | Licensing | Downloads
TechNotes | FAQs
| E-Mail Zeus | GuestBook
| Glossary
Copyright © 1996-1997. Zeus
Productions. All Rights Reserved.