Discussion Locked

Get Windows 95 Username in DOS command

0 helpful
10 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I am looking for a way to set up environment for username for Windows 95 workstation. In NT workstation environment "Set username=%username%" is work fine but doesn't work in windows 95 environment.
Both workstation were logon to same server and user name. Is there any other way how to make it work or any other way to lookup a username from windows 95 workstation.

10 replies

by techrep

At a WINDOWS DOS prompt (MSDOS Prompt) type "NET config".

help for other NET commands are available by typing "NET /? | more"

that help?

by msillers

There is a utility called Winset that can capture the user name and is specifically for use with Win9x. It is also useful for other global environmental variables. See Readme.txt in the Admin\Apptools\Envvars folder on the Windows 95 CD-ROM. This isfrom an old login script: SHELL "Z:\WINSET USERNAME=@USERID"

by ibrahim

Thanks. Though the scripts is not applicable but it still help me to figure it out.

by stuff

You can use the set command from DOS,

To set the user ID you might want to put something like this in the logon script;

set userid=chris

you can the reference this later by encapsulating the variable (userid) in %'s
eg typing;
echo %userid%
would report;
chris

Hope this helps, it brings back memories I liked this on.

Chris

by stuff

Sorry, that's pretty much what you said in the question wasn't it?

I tested it and it did work for me...

This discussion is closed to new replies.