Configuring System Startup Options

Using a graphical user interface

  1. From the Control Panel, open the System applet.
  2. Select the Advanced tab.
  3. Under Startup and Recovery, click the Settings button.
  4. Under the System Startup heading, you can modify the default operating system and the amount of time the system waits before loading the default OS.
  5. To change additional startup options on Windows Server 2003, you can click the Edit button to modify the boot.ini file.
  6. Click OK until all of the windows are closed.

Using a command-line interface
Windows Server 2003 includes a new tool called bootcfg.exe (also available with Windows XP) that lets you examine and modify the system startup options (including boot.ini) from the command line. To get a list of the current startup options, run bootcfg without any parameters:

> bootcfg

The following command changes the timeout setting for the default OS option to 15 seconds:

> bootcfg /timeout 15

The following command adds the /DEBUG and /SOS options to the OS option defined by ID 2 (which you can see by running bootcfg without any options):

> bootcfg /Raw "/DEBUG /SOS" /A /ID 2

For the complete list of bootcfg options, run bootcfg /? from the command line.

The Edit button is available only on Windows Server 2003. If you want to modify the boot.ini file on Windows 2000, you’ll have to use the procedures described next in the command-line solution.

Since Windows 2000 doesn’t come with the bootcfg utility, you have to modify the boot.ini file directly. First, make the file editable:

> attrib %SystemDrive%\boot.ini -h -r -s

Then edit the file:

> edit %SystemDrive%\boot.ini

And finally, make the file read-only and hidden again:

> attrib %SystemDrive%\boot.ini +h +r +s

Using VBScript

' This code displays the system startup settings.
' ------ SCRIPT CONFIGURATION ------
strComputer = "."  ' e.g., rallen-srv01
' ------ END CONFIGURATION ---------
set objWMI = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
set colCompSys = objWMI.InstancesOf("Win32_ComputerSystem")
for Each objCompSys in colCompSys
    WScript.Echo "Startup Delay: " & objCompSys.SystemStartupDelay
    for each strOption in objCompSys.SystemStartupOptions
       WScript.Echo "Operating System: " & strOption
    next
next
' This code sets the startup delay to 10 seconds.
 ' ------ SCRIPT CONFIGURATION ------
 strComputer = "."  ' e.g., rallen-srv01
 ' ------ END CONFIGURATION ---------
 set objWMI = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
 set colCompSys = objWMI.InstancesOf("Win32_ComputerSystem")
 for Each objCompSys in colCompSys
     WScript.Echo "Startup Delay Before: " & objCompSys.SystemStartupDelay
     objCompSys.SystemStartupDelay = 10
     objCompSys.Put_
     WScript.Echo "Startup Delay After: " & objCompSys.SystemStartupDelay
 next