Computing.Net > Forums > Windows NT > Windows NT login scripts

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.

Windows NT login scripts

Reply to Message Icon

Name: NigelStevens
Date: September 30, 2004 at 02:16:10 Pacific
OS: Windows XP Professional
CPU/Ram: Athlon 1500+ 384Mb
Comment:

Hi
I'm trying to create a login script for our NT4 server. We have several people logging in using Win95, 98, 2000 Pro, & XP Pro. What I want to do is log the user's login names and the name of the machine they're logging in from, as well as basic OS information etc..
In the Login script (login.bat), I've included e.g.
echo %USERNAME% logging in from %COMPUTERNAME% >> \Logs\%COMPUTERNAME%.txt
ver >> \Logs\%COMPUTERNAME%.txt
echo . >> \Logs\%COMPUTERNAME%.txt
echo Environment variables are as follows : >> \Logs\%COMPUTERNAME%.txt
set >> \Logs\%COMPUTERNAME%.txt

Unfortunately, the %USERNAME% and %COMPUTERNAME% variables don't seem to be set in some of the PCs by the time the login script is run.

Can anyone please help with this ?




Sponsored Link
Ads by Google

Response Number 1
Name: Steve Dunn
Date: October 4, 2004 at 15:13:35 Pacific
Reply:

Those variables are only set in NT based systems (NT/2k/XP) - and won't be in 9x/ME. I think there are some clever solutions available - try Google to look for them? (eg, you can set them up in autoexec.bat on 9x machines - computer should be easy enough to populate - just set it to what it is, but user will depend on logon if multi-user machines.


0
Reply to Message Icon

Related Posts

See More







Post Locked

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


Go to Windows NT Forum Home


Sponsored links

Ads by Google


Results for: Windows NT login scripts

Windows NT Login Scripts www.computing.net/answers/windows-nt/windows-nt-login-scripts/10589.html

NT Login Script problems! www.computing.net/answers/windows-nt/nt-login-script-problems/5733.html

First NT Login Script www.computing.net/answers/windows-nt/first-nt-login-script/14953.html