ChkINF
The INF File Syntax Checker, or ChkINF, is a Perl script that checks the structure and syntax of Microsoft® Windows® 2000 and Windows XP driver .inf files. Results are presented in HTML format, and include a list of the errors and warnings detected in each .inf file, with each error and warning shown next to the errant .inf file entry. Note that ChkINF does not support Windows 98 or Windows Me .inf files.
The ChkINF tool includes support for all .inf sections and directives that apply to all classes of devices.
In addition, ChkINF has device-class-specific support for many device classes. It also can check .inf files used for installing many classes of file system drivers. For a complete list of these classes, see the chkinf.htm file that is located in the Tools\chkinf subdirectory of the DDK.
ChkINF has not been extensively tested. Review your results carefully.
Running the Tool
Because ChkINF is a Perl script, in order to use the tool you will need to obtain a Perl interpreter. ChkINF requires a Perl interpreter that is Version 5.003_07 or greater. ChkINF should work with any version of Perl 5.0 or greater, but has not been tested with any versions previous to 5.003_07.
ChkINF has been tested with the following Perl interpreters:
- GNU Perl 5.005_02 compiled for Win32®
- GNU Perl 5.6.0 compiled for Win32
- Perl for Win32 5.003_07 from ActiveWare Internet Corp.
- ActivePerl 5.6.1.631 from ActiveState (see the ActiveState Web site)
Microsoft neither endorses nor recommends any specific Perl interpreters.
ChkINF is located in the %DDKRoot%\Tools\Chkinf subdirectory, and should be executed from an MS-DOS® Command prompt.
A batch file, ChkINF.bat, is provided for smooth execution. This batch file can be executed by using the following syntax:
chkinf FileList [/L LogFile] [/B] [/LO] [/DC Options]
Parameters
- FileList
- Specifies the files to be used. This can be the name of a single .inf file or a directory name. If a directory is specified, ChkINF will look for all .inf files in this directory. Wildcards may be used (for example, net*.inf). ChkINF will first expand all wildcards, and then process all applicable .inf files.
- /L LogFile
- Specifies the name of the log file to be created.
- /B
- Causes the default browser to be launched. ChkINF results will be displayed in this browser.
- /LO
- Causes ChkINF to compare all copied files (CopyFiles) with Layout.inf.
- /DC Options
- Specifies the device class-specific options that ChkINF should use when checking .inf files. At present, the only supported option is NOFAX, which instructs ChkINF not to check any Fax keys present in modem .inf files.
Output
ChkINF produces three types of files at the end of the checking process.
- Summary.htm. This is a single HTML file that lists all of the .inf files that were checked, along with the number of errors and warnings detected in each one. The name of each .inf file is linked to the respective .htm file described in the File Manifest section.
- Individual .htm results files. For each checked .inf file, a file with the same name and an .htm extension is created. This includes a log of the results for that .inf file.
- A log file. This will be created if the /L option is used on the ChkINF command line.
The individual .htm results files include the following sections:
- Errors
- A list of the errors found in the .inf file, along with the error message and the line in the .inf file where it was detected. Each error includes a link to its location in the Annotated INF section.
- Warnings
- A list of the warnings detected in the .inf file, along with the warning message and the line in the .inf file where it was detected. Each warning includes a link to its location in the Annotated INF section.
- Sections included from other infs
- A list of the sections included from other .inf files. Each section listed includes a link to its location in the Sections included from other infs section. This item is omitted if the .inf being checked did not include any sections from other .inf files.
- Annotated INF
- The complete source for the .inf file, with the warning and error messages displayed adjacent to the line where the warning or error was detected.
- Sections included from other infs
- The complete source for the included sections, with warning and error messages displayed adjacent to the line where the warning or error was detected. This section is omitted if the .inf file being checked did not include any sections from other .inf files.
These files are saved into the subdirectory htm, located off the directory from which ChkINF is invoked.
Limitations
ChkINF does not support Windows 98 or Windows Me .inf files. ChkINF will not accurately check .inf structure and syntax that is specific to Windows 98/Me .inf files.
The tool does not perform device-class-specific testing, with the exception of the device classes listed in the chkinf.htm file (located in the Tools\chkinf subdirectory of the DDK.)
ChkINF has been tested with the following Perl interpreters:
- GNU Perl 5.005_02 compiled for Win32®
- GNU Perl 5.6.0 compiled for Win32
- Perl for Win32 5.003_07 from ActiveWare Internet Corp.
- ActivePerl 5.6.1.631 from ActiveState (see the ActiveState Web site)
ChkINF now includes limited support for .inf files saved in Unicode format (including Unicode Big Endian and UTF8), but there are some existing problems with the support for extended characters. If problems are encountered with .inf files in Unicode format, save the file as an ASCII text file and then run the tool.
ChkINF must be executed on the target platform in order to accurately check sections included from other .inf files via Include and Needs directives.
ChkINF issues warnings for any sections that are not referenced by a directive elsewhere in the .inf file. This is a change from previous versions of the tool, which reported errors for un-referenced sections.
ChkINF does not check for all relevant Registry keys set by an .inf file. An .inf file that passes with no errors may not function correctly.
ChkINF incorrectly reports an error if a single named service uses different binary names on the x86 and IA-64 platforms.
File Manifest
Here is a description of the files used by ChkINF.
- ChkInf.bat
- Batch file for smooth execution. (See Running the Tool for the syntax used.)
- ChkInf.htm
- ChkINF readme (identical to this documentation).
- ChkInf.pm
- Main module.
- InfFile.pm
- ChkINF internal support module.
- Infrastructure.pm
- ChkINF internal support module.
- InfSection.pm
- ChkINF internal support module.
- SmartGlob.pm
- ChkINF internal support module.
- 1394.pm
- 1394 Host Bus Controllers device class specific module.
- 61883.pm
- 1394 devices that support the 61883 protocol device class specific module.
- AVC.pm
- 1394 devices that support the AVC protocol device class specific module.
- Battery.pm
- Battery device class specific module.
- CDROM.pm
- CD-ROM device class specific module.
- DiskDrive.pm
- Disk Drive device class specific module.
- Display.pm
- Display device class specific module.
- Dot4.pm
- Dot4 device class specific module.
- Dot4Print.pm
- Dot4 printer device class specific module.
- FaxReg.pm
- Modem device class specific sub-module.
- FDC.pm
- Floppy Disk Controller device class specific module.
- FloppyDisk.pm
- Floppy Disk Drives device class specific module.
- Generic.pm
- "Generic" module for devices for which a device class specific module does not yet exist.
- HDC.pm
- Hard Disk Controllers device class specific module.
- HIDClass.pm
- Human Interface Device device class specific module.
- Image.pm
- Image device class specific module.
- Infrared.pm
- Infrared (IrDA) device class specific module.
- Keyboard.pm
- Keyboard device class specific module.
- Media.pm
- Multimedia device class specific module.
- MediumChanger.pm
- Medium Changers device class specific module.
- Modem.pm
- Modem device class specific module.
- Monitor.pm
- Monitor device class specific module.
- Mouse.pm
- Mouse device class specific module.
- MTD.pm
- Memory Technology Driver device class specific module.
- Multifunction.pm
- Multifunction Devices device class specific module.
- MultiportSerial.pm
- Multi-port Serial Adapter device class specific module.
- Net.pm
- Net (network adapter) device class specific module.
- NetClient.pm
- Network Client device class specific module.
- NetService.pm
- Network Service device class specific module.
- NetTrans.pm
- Network Transport device class specific module.
- PCMCIA.pm
- PCMCIA Adapter device class specific module.
- PnPPrinters.pm
- PnP Printers device class specific module.
- Ports.pm
- Ports device class specific module.
- Printer.pm
- Printer device class specific module.
- Processor.pm
- Processor device class specific module.
- SBP2.pm
- 1394 devices that support the SBP2 protocol device class specific module.
- SCSIAdapter.pm
- SCSI and RAID Controllers device class specific module.
- SmartCardReader.pm
- Smart Card Readers device class specific module.
- System.pm
- System device class specific module.
- TapeDrive.pm
- Tape Drives device class specific module.
- USB.pm
- USB device class specific module.
- Volume.pm
- Storage Volumes device class specific module.
- WCEUSBS.pm
- Windows CE USB Active Sync device class specific module.
- ActivityMonitor.pm
- Activity Monitor file system filter module.
- AntiVirus.pm
- Anti-Virus file system filter module.
- CFSMetaDataSErver.pm
- CFS Meta Data Server file system filter module.
- Compression.pm
- Compression file system filter module.
- ContentScreener.pm
- Content Screener file system filter module.
- ContinuousBackup.pm
- Continuous Backup file system filter module.
- CopyProtection.pm
- Copy Protection file system filter module.
- Encryption.pm
- Encryption file system filter module.
- FSFilterSystem.pm
- File System Filters module.
- HSM.pm
- HSM file system filter module.
- OpenFileBackup.pm
- Open File Backup file system filter module.
- PhysicalQuotaManagement.pm
- Physical Quota Management file system filter module.
- QuotaManagement.pm
- Quota Management file system filter module.
- Replication.pm
- Replication file system filter module.
- SecurityEnhancer.pm
- Security Enhancer file system filter module.
- Undelete.pm
- Undelete file system filter module.