How to Clear Environment Variables Using Setx.exe
ID: Q195050
|
The information in this article applies to:
-
Microsoft Windows NT Workstation version 4.0
-
Microsoft Windows NT Server version 4.0
-
Microsoft Windows NT Server, Enterprise Edition version 4.0
SUMMARY
This article describes how to use the Setx.exe tool to clear both user
and system environment variables. Setx.exe is included with the Windows NT
4.0 Resource Kit.
MORE INFORMATION
To clear an environment variable using Setx.exe at a command prompt:
- Click Start, point to Programs, and then click Command Prompt.
- If you want to clear a user environment variable, type the
following line
setx <variable> ""
where <variable> is the user environment variable.
- If you want to clear a system environment variable, type the
following line
setx <variable> "" -m
where <variable> is the system environment variable.
- Close the command prompt.
When you use Setx.exe to clear an environment variable value, the
environment variable name is not affected.
Additional query words:
set null
Keywords : kbenv kbtool
Version : WINNT:4.0
Platform : winnt
Issue type : kbhowto