%Username% Resolved in GUI but Not at Command Line
Article ID: 197447
Article Last Modified on 10/31/2006
APPLIES TO
- Microsoft Windows NT Server 4.0 Standard Edition
- Microsoft Windows NT Workstation 4.0 Developer Edition
This article was previously published under Q197447
SYMPTOMS
When you add a system environment variable using the System tool in Control
Panel, the %Username% will translate in the GUI of the tool to the user who
is currently logged on, but will not in a command prompt.
RESOLUTION
To work around this problem, you can use the SETX command in a logon script
to add the environment variable each time a user logs on. The SETX command
can be found in the Windows NT 4.0 Resource Kit.
Keywords: kbnofix kbprb KB197447