Working with User Variables in XP


By Dan DiNicolo, April 19th, 2007 Posted in Tweaking XP. Subscribe to our RSS Feed



Rather Have Fast and Secure Remote Control?

 Securely access PCs and servers worldwide through any firewall. Try it and see for yourself!

Windows XP also includes a number of variables to help control and define the user environment. The %username% can be used in place of the currently logged on user, because it will be populated with that value automatically. This comes in handy if you were writing a logon script, and wanted to use the same script for multiple users. For example, the command net use g: \\server1\users\%username% could be used to map drive G: to a folder with the same name as the logged on user. This will save the time and effort associated with creating many individual scripts for different users.

Other useful user-related variables include %userprofile% (try issuing the command cd %userprofile% from the command line C:\> prompt), which was discussed earlier, and %userdomain%, which will return the name of the domain of which the current user is a member. For example, at the command line type echo %userdomain%, and the name of the domain (or computer) that validated the user’s logon request will be displayed.

Written by Dan DiNicolo - Visit Website

Print This Post Print This Post













All Tutorials by Category:















Entire site Copyright © 1999-2007 2000Trainers.com, all rights reserved.
Content on this site may not be copied or reproduced in any way without permission.





IT Showcase


Text Link Ads

View all Tutorials by Category: