Computing.Net > Forums > Programming > Current connected User - Dos Batch

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Current connected User - Dos Batch

Reply to Message Icon

Name: jpontes6
Date: May 19, 2008 at 11:46:43 Pacific
OS: XP
CPU/Ram: 2GB
Product: Dell
Comment:

Inside of a Dos batch file, i'd like to get the name of the user who is connected to the windows and save that name in a variable to be used inside of the batch.
Is it possible?

I appreciate any help. Thanks.



Sponsored Link
Ads by Google

Response Number 1
Name: klint
Date: May 20, 2008 at 02:17:07 Pacific
Reply:

You don't need to create a variable, it already exists:

echo %USERNAME%


0

Response Number 2
Name: jpontes6
Date: May 20, 2008 at 06:07:26 Pacific
Reply:

Thank you! That was exactly what I needed.


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


attn: IVO * goto :label i... Need to move all .txt and...



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Current connected User - Dos Batch

DOS Batch Window Position www.computing.net/answers/programming/dos-batch-window-position/18399.html

DOS Batch program questions www.computing.net/answers/programming/dos-batch-program-questions/20355.html

DOS - batch variables www.computing.net/answers/programming/dos-batch-variables/15058.html