Variables in Windows
|
|
|
|
| Articles Reviews Microsoft Windows | |||||
| Written by Adi Bach | |||||
| Wednesday, 13 December 2006 | |||||
Page 1 of 3
{mos_sb_discuss:42} A variable is a reference to a location in the computer’s memory where your scripts can store and retrieve data. There are two primary types of variables that you will work with in Windows shell scripts, environment variables, and script variables. An environment variable is created and maintained by the operating system. Your scripts can access and use the values stored in environment variables. The other type of variable that you’ll use are script variables. A script variable is created during the execution of a script and then deleted when the script stops running.
The Windows shell provides the SET command as your primary means for
displaying, modifying, and deleting variables. The SET command supports
several different variations of syntax, as shown below. When used in its first form, the SET command displays,
creates, modifies, and deletes variables. Variable specifies the name
of the variable to be displayed, created, modified, or deleted. Value
specifies an optional data assignment. Accessing Environment Variables Thereare two types of environment variables: Viewing Environment Variable On Windows XP, a number of environment variables can be
accessed from the System Properties dialog using the following
procedure: System environment variables are displayed at the bottom of the
dialog. You’ll usually find a number of different system environment
variables listed here, including
|
|||||
| Last Updated ( Saturday, 07 July 2007 ) | |||||
| < Prev | Next > |
|---|







