Discussion Locked

Network login scripts to map ?

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

Trying to get a script to work for network login, so far it does nothing ?
file.bat:
if '%OS%'==Windows_NT' goto nt4
:nt
net use h:/del
net use h:\\home\local (local is a share)
:end

profile Login Script Name: scripts\file.bat

which is stored: c:\\winnt\system32\repl\import\scripts\

7 replies

by dklippert

Just a gues:
The named location flag should be consistent --(nt4)
There should be a space after the h: in both places also an apostrophe in front of Windows_NT

by jschultz

I see a couple of things here. First, your script says goto nt4 and your section below is nt, not nt4. Also, the net use command is not being used correctly. Go to dos and type "net use" without the quotes and you can see the syntax there. Also,I am not familiar with the proper syntax for your first line, but you don't have an even number of apostrophes there and that is kind of a warning sign to me. One of the easiest ways to setup a login script is to download Microsoft's kixtart utility (search on their web site or look specifically in technet). Their manual has all kinds of examples and instructions on how to do a lot of things in the login script. You can even edit registry keys. Hope this helps!

by joncr

Copy and paste this code:

if %OS% == "Windows_NT" goto nt
goto end
:nt
net use h: /d
net use h: \\home\local
:end

That should do it!

This discussion is closed to new replies.