Discussion Locked

LOGIN SCRIPT

0 helpful
9 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
HOW TO WRITE USER LOGON SCRIPT IN NT

9 replies

by donalconlon

You can use notepad to write logon scripts.
Enter your commands in a notepad file e.g. to map a drive you would the net use command and save your file with the .bat extension. Place your bat file in the c:\winnt\system32\repl\import\scripts folder

by jsarinana

Here's an example that works for me:
@echo off
@Echo Mapping your KSN INC standard network drives
REM knet.bat standard mapped drives H, L, M, N, P, R, S 090401

@net use h: /delete /yes >nul
@net use l: /delete /yes >nul
@net use m: /delete /yes >nul
@net use n: /delete /yes >nul
@net use p: /delete /yes >nul
@net use r: /delete /yes >nul
@net use s: /delete /yes >nul

@net use h: \\home\%USERNAME% /yes
@Echo Mapping H: (HOME drive)...
@net use l: \\ksn-inc\library /yes
@Echo Mapping L: (Library server)...
@net use m: \\gis\server /yes
@Echo Mapping M: (GIS server)...
@net use n: \\plotroom\d /yes
@Echo Mapping N: (Plotroom server)...
@net use p: \\ksn3\proj /yes
@Echo Mapping P: (Project server)...
@net use r: \\ksn2\raw /yes
@echo Mapping R: (Raw server)...
@net use s: \\ksn-inc\share /yes
@echo Mapping S (Share drive)...

net time \\ksn-inc /set /yes
@echo Hello %USERNAME, Welcome to the KSN INC. network

works for NT & Win2000, for Win98 I replaced %USERNAME% with the users name.

by curlergirl

An NT login script is just a text file with command-line commands in it, such as "net use" commands to map drives, which is one of the most common uses of such a script. Login scripts can be saved with either a .bat or .cmd extension (only NT or 2000 workstations will run .cmd scripts). What commands you can use depends somewhat on what OS's your workstations are running - NT, 2000 or Win9x. You can get a basuc reference list of NT commands by going to Start/Help on your NT server and looking up "commands". If you need something more sophisticated than you can do with standard NT batch language, you can use the Windows Scripting language, or a tool like Kixstart, which I think someone else mentioned, also. Hope this helps!

This discussion is closed to new replies.