Managing Computer Recovery Options

Microsoft® Windows® 2000 Scripting Guide

Occasionally a computer encounters an error condition from which it cannot recover. This condition is called a stop event because the computer stops processing when the error occurs. In addition to halting all processing, the computer displays a special kind of error message known as a stop message.

A stop message is often called a stop error or blue screen. The blue screen refers to the fact that the stop message changes the display to a solid blue character-mode background that contains the error message. The message itself consists of the following items:

  • Unique identifier.

  • Series of four hexadecimal numbers that identify error parameters.

  • Symbolic name for the error condition.

  • Additional information related to the problem.

For example, a stop message header might look similar to the following:

            DSR CTS
*** STOP:  0x0000000A (0x00000000, 0x0000001a, 0x00000000, 0x00000000)
IRQL_NOT_LESS_OR_EQUAL
P4-0300 irql:lf  SYSVER: 0xf000030e
Dll Base DateStmp - Name             Dll Base DateStmp - Name
80100000 2e53fe55 - ntoskrnl.exe     80400000 2e53eba6 - hal.dll

Besides displaying this message, a computer can be configured to take additional actions after a stop event. For example, you can configure a computer to automatically restart after a stop event, or to save a memory dump, a file containing the complete contents of the system memory at the time the stop event occurred. This file can be extremely useful to Microsoft support personnel helping you troubleshoot and resolve the problem.

The WMI Win32_OSRecoveryConfiguration class allows you to both retrieve and configure the recovery options for a computer. A subset of properties available through the Win32_OSRecoveryConfiguration class is shown in Table 8.19. Unless otherwise noted, each of these properties can be modified programmatically.

Table 8.19 Win32_OSRecoveryConfiguration Properties

Property

Description

AutoReboot

Boolean value that indicates whether the system will automatically reboot during a recovery operation.

DebugPathFile

Full path to the debug file. A debug file is created with the memory state of the computer after a computer failure. For example: "C:\Windows\Memory.dmp".

KernelOnlyDump

Specifies that only kernel debug information will be written to the debug log file. If True, only the state of the kernel is written to a file in the event of a system failure. If False, the system will try to log the state of the memory and any devices that can provide information about the system when it failed.

MiniDumpDirectory

Folder where small memory dump files will be recorded and accumulated. For example, "%systemroot%\MiniDump".

Name

Name of the operating system, along with information regarding the file path and disk drive where the operating system has been installed.

For example, a Windows 2000 Professional computer might have a name similar to this:

"Microsoft Windows 2000 Professional|C:\WINNT|\Device\Harddisk0\Partition1"

This property is read-only.

OverWriteExistingDebugFile

New log file will overwrite an existing one. If this property is False, each new log file will be saved under a unique file name.

SendAdminAlert

Alert message will be sent to the system administrator in the event of an operating system failure.

WriteDebugInfo

Debugging information is to be written to a log file.

WriteToSystemLog

Events will be written to a system log.

The relationship between the Win32_OSRecoveryConfiguration properties and the Windows graphical user interface is shown in Figure 8.5.

Figure 8.5 Win32_OSRecoveryConfiguration and the Startup and Recovery Page

sas_cpm_08c