Microsoft KB Archive/195050

= How to Clear Environment Variables Using Setx.exe =

Article ID: 195050

Article Last Modified on 10/31/2006

-

APPLIES TO


 * Microsoft Windows NT Workstation 4.0 Developer Edition
 * Microsoft Windows NT Server 4.0 Standard Edition
 * Microsoft Windows NT Server 4.0 Enterprise Edition

-



This article was previously published under Q195050



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:


 * 1) Click Start, point to Programs, and then click Command Prompt.
 * 2) If you want to clear a user environment variable, type the following line

setx ""

where is the user environment variable.
 * 1) If you want to clear a system environment variable, type the following line

setx "" -m

where is the system environment variable.
 * 1) 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 kbhowto KB195050

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.