You can control the amount of information that is written to the SetupAPI log, either for all Setup applications or for individual Setup applications.
To change the level of information written to the SetupAPI log for all Setup applications, create (or modify) the following registry value:
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Setup\LogLevel
By setting this value (using the values listed in the tables below) you can choose the level of errors that are logged, modify the verbosity of logging, or turn off logging. You can also log information to a debugger as well as to the log file.
To specify logging levels for individual Setup applications, create a registry entry under the following key:
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Setup\AppLogLevels
Under this key, create a value name representing the application's executable file name, and assign the desired logging level to that name (using the values listed in the tables below), such as service.exe=LoggingLevel.
The logging level is a DWORD value. If this value is not specified or is zero, SetupAPI uses a default behavior, as indicated in the tables below.
The DWORD value is made up of three parts, formatted as 0xSSSSDDGG. The low eight bits, represented by the mask 0x000000FF, set the logging level for general Setup operations. The next-higher eight bits, represented by the mask 0x0000FF00, set the logging level for device installation operations. The highest bits are special flags.
The following tables contain the general logging levels, device installation logging levels, and special logging flags for Windows 2000 and later.
| General Logging Levels | Meaning |
|---|---|
| 0x00000000 | Use default settings (currently 0x20). |
| 0x00000001 | Off (no Setup logging). |
| 0x00000010 | Log errors. |
| 0x00000020 | Log errors and warnings. |
| 0x00000030 | Log errors, warnings and other information. |
| 0x00000040 | Log errors, warnings and other information in verbose mode. |
| 0x00000050 | Log errors, warnings and other information in verbose mode, plus time-stamped entries. |
| 0x00000060 | Log errors, warnings and other information in verbose mode, plus time entries. Additionally, all entries are time-stamped. |
| 0x00000070 | Log errors, warnings and other information in verbose mode, plus time messages. All entries are time-stamped. Additional messages that can slow down the system, such as cache hits, are included. |
| 0x000000FF | Specifies the most verbose logging available. |
| Device Logging Levels | Meaning |
|---|---|
| 0x00000000 | Use default settings (currently 0x3000). |
| 0x00000100 | Off (no Setup logging). |
| 0x00001000 | Log errors. |
| 0x00002000 | Log errors and warnings. |
| 0x00003000 | Log errors, warnings and other information. |
| 0x00004000 | Log errors, warnings and other information in verbose mode. |
| 0x00005000 | Log errors, warnings and other information in verbose mode, plus time-stamped entries. |
| 0x00006000 | Log errors, warnings and other information in verbose mode, plus time entries. Additionally, all entries are time-stamped. |
| 0x00007000 | Log errors, warnings and other information in verbose mode, plus time messages. All entries are time-stamped. Additional messages that can slow down the system, such as cache hits, are included. |
| 0x0000FF00 | Specifies the most verbose logging available. |
| Special Flags | Meaning |
|---|---|
| 0x08000000 | (Windows XP and later) Add a time stamp to all log entries. |
| 0x20000000 | (Windows XP and later) Don't flush logging information to disk after each entry is written. (Logging is faster, but information could be lost if the system crashes.) |
| 0x40000000 | Write log entries chronologically instead of grouping entries. |
| 0x80000000 | Send the output to the debugger as well as to the log file. |
For example, SetupAPI interprets some sample LoggingFlags values as follows:
To modify the default SetupAPI logging levels during a clean installation, edit the registry during the period between text-mode Setup and GUI-mode Setup. The following steps describe the procedure. These steps assume that you are installing to D:\Winnt and have a working build of the same version of Windows on another partition. Change the SetupAPI logging levels as follows:
On Windows XP and later, run RegEdit. Highlight HKEY_LOCAL_MACHINE, click on the File menu and select Load Hive.
HKEY_LOCAL_MACHINE\_sw.sav\Microsoft\Windows\CurrentVersion\Setup
On Windows 2000, click on the Security menu, select Permissions, and grant full control to Administrator.
On Windows XP and later, click on the Edit menu, select Permissions, and grant full control to Administrator.
On Windows XP and later, click on Edit and select New DWORD Value.
Enter the value. For example, add "0xFFFF" to enable full verbose logging.