Hello all...
I'm running Windows 2000 Server as a domain controller in a mixed client
environment (Windows 2000/NT/Me/98/95). I have attempted to create a
generic login script that will map 2 drives to 2 different user
directories (\\server1\users\%username% and
\\server1\users\%username%\private) Additionally, it will display the
current date and time and a nice little MOTD.
It runs wonderfully under Windows 2000. Here are the problems I'm having.
1. On Windows 95/98/Me, I attempted to put an "else" after the "if %OS%"
below that would say "net use u: \\server1\Users\rlewis". (meaning, I'd
create a separate login script for each user running 95/98/Me... luckily,
that's not many). It won't let me map a drive to the individual
user-directory... just "Users". Is there any way to make this automatic
drive mapping work under 95/98/Me?
2. Under 95/98/Me, the "%date% %time%" doesn't work... just shows up
blank... so, I had to add the "if %OS%=Windows_NT" so it would skip the
lines on those OSes.
3. Even with the script below, I still get 3 syntax errors (I assume
because of the "if" statements) on Windows 95/98/Me.
I'm trying to do some simple stuff, and it seems pretty straightforward,
but has been quite a pain in the neck. Any ideas?
Thanks!
-- Rachael
Here's the script:
@echo off
rem ** Map non-private home directory **
if %OS% == Windows_NT (net use u: \\server1\Users\%USERNAME% /yes
/persistent:no)
rem ** Map private home directory **
if %OS% == Windows_NT (net use p: \\server1\Users\%USERNAME%\private /yes
/persistent:no)
if %OS% == Windows_NT echo Current date and time: %date% %time%
echo.
echo **************************************************
echo ***** MOTD *****
echo **************************************************
echo.
pause
exit
http://www.sunbelt-software.com/ntsysadmin_list_charter.htm