I'm still learning my job here, and am pretty clueless on how to write a login script for Windows 2000 server. Does anyone know of a good resource I can find online to figure all this out?
Okay, I've gotten a little bit started, but can anyone tell me how to script the following: Certain computers should automatically map to certain shared drives, and others to others. Is this possible with an "if" statment?
For example, how do I make ComputerA connect to "UserApps" while ComputerB connects to "AdminApps" all within the same login script?
Also, how can I tell the computer to disconnect any previous drive mappings?
swm2win,
you may be able to do this from group policy. as far as drive mappings take a look at the 'net use' command - type 'net help use' at a command prompt.
hth
regards,
longhair
as longhair said....make 2 groups & 2 polices and then each should have a login script.
If ur worried about some users already having mapped drives then u can use something in line of:
--------------login.bat---------------
net use f: /del >>C:\login_error.log
net use f: \\Server\share /y >>C:\login_error.log
---------------------------------------
in other words it would delete users' mapped drive letter F to whatever they might have mapped out manually and then re-map it to your desired share...while making a log file on their C drive
...many here will arguee that .bat files are better repleaced by VBscript based ones IF u use Only win2xxx stations and servers....
All the best!
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.