Posts Tagged ‘Logon Script’


Windows 2000/XP/2003 supports the color command to change the background and foreground in a shell prompt. The basic syntax of the color command is as follows:

COLOR BF

Here, B is the background color value and F is the foreground color value. The color command supports the following color values:

  • 0—Black
  • 1—Blue
  • 2—Green
  • 3—Aqua
  • 4—Red
  • 5—Purple
  • 6—Yellow
  • 7—White
  • 8—Gray
  • 9—Light Blue
  • A—Light Green
  • B—Light Aqua
  • C—Light Red
  • D—Light Purple
  • E—Light Yellow
  • F—Bright White

Here is an example to change the shell prompt colors to bright white text on a blue background:

IF “%OS%”= =”Windows_NT” COLOR 1F

Here, %OS% is an environment variable that indicates the operating system type.


Windows 2000/XP/2003 supports the title command to change the title of a shell prompt window. The basic syntax of the title command is as follows:

Title name

Here, name is the name to give the current command-prompt window. Here is an example to change the shell prompt title to “Logon Script”:

If “%OS%”==”Windows_NT” Title Logon Script

Here, %OS% is an environment variable that indicates the operating system type.


Shell scripting is the original source of logon scripting for Windows. Although it may lack some of the more complex features of other scripting languages, its main advantage is compatibility. Unlike KiXtart or Windows Script Host, shell scripting does not require any installed client files to run (other than the operating system). Shell scripting provides a simple, logon script solution for quick and easy deployment.