Command Prompt for Windows

Command XSET


Display, set or remove persistent environment variables.


XSET [variable=[chars]]
variablePersistent environment variable name.
charsA series of characters to assign to the variable.


The persistent environment variables are stored in the system registry and Windows NT will automatically include these environment variables in the environment space for all programs. Also, setting or deleting a persistent environment variable will cause all interested programs to update their environment space immediately (eg. Program Manager, the WinOne® Command Prompt etc).

Type XSET with no parameters to display a list of all the persistent environment variables.

When parameter chars is not specified then the persistent environment variable will be removed from the environment space,

The PATH environment variable is a special case and is made up of 3 parts, as below :-

system_path ; persistent_path ; autoexec_path

Command XSET will only manipulate the persistent_path part of the complete PATH environment variable. For example, to add C:\TEST enter at the command prompt :-

XSET path=c:\test

and the resulting PATH environment variable will be :-

system_path ; c:\test ; autoexec_path

Command XSET is not available under Windows 95.

Example on using XSET.

Also see command SET, LET and Batch Files.