Microsoft® Windows® 2000 Scripting Guide
« Previous | Next »
Administrators can control both the default operating system loaded by a computer and the amount of time that users are given to choose an alternate operating system when the computer starts. This allows administrators to:
If the operating system wait time is set to 0 seconds, the computer automatically loads the default operating system without giving the user an opportunity to choose an alternate system. This can help prevent users from choosing a valid but typically inappropriate operating system such as the Windows 2000 Recovery Console. It also helps the computer start faster because the computer does not have to wait for 30 seconds before it begins to load the operating system.
The selection of the operating system to be loaded when a computer starts is based on the information stored in the Boot.ini file. The Boot.ini file includes two sections:
On a typical Windows-based computer, the Boot loader section looks similar to the following:
[boot loader] timeout=30 default=multi(0)disk(0)rdisk(0)partition(1)\WINNT
On a server running Windows 2000, the Operating systems section might look similar to the following:
[operating systems] multi(0)disk(0)rdisk(0)partition(1)\WINNT=
"Microsoft Windows 2000 Server
"/fastdetect
The Win32_ComputerSystem class allows you to programmatically configure the time-out value or the default operating system by setting the properties shown in Table 8.17.
Table 8.17 Win32_ComputerSystem Properties for Configuring Startup Options
Property | Description |
---|---|
SystemStartupDelay | Specifies the number of seconds to wait before NTLDR loads the default operating system. |
SystemStartupSetting | Specifies the index value of the operating system to be set as the default. The first operating system listed is item 0, with additional operating systems numbered consecutively. For example, in the following Boot.ini, there are two operating systems: Microsoft Windows XP Professional (with the index value 0), and Microsoft Windows 2000 Professional (with the index value 1).
If you specify an incorrect value (for example, if you specify index 4 when only two operating systems are included), the script will fail with an out-of-range error. |
The relationship between the Win32_ComputerSystem properties and the Windows graphical user interface are shown in Figure 8.4.
Figure 8.4 Startup Options and the Startup and Recovery Page
Startup Options and the Startup and Recovery Page
Note
Listing 8.19 contains a script that configures the system startup delay on a computer. To carry out this task, the script must perform the following steps:
Listing 8.19 Configuring the System Startup Delay
|
|
After running this script, the Boot.ini will look similar to the following:
[boot loader] timeout=10 default=multi(0)disk(0)rdisk(0)partition(1)\WINNT
Send us your feedback | « Previous | Next » |