Computing.Net > Forums > Windows 2000 > Login script to map and unmap a drive

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.

Login script to map and unmap a drive

Reply to Message Icon

Name: Tom
Date: April 10, 2002 at 13:09:02 Pacific
Comment:


Can I use a login script to run the net use command to map a drive and if the client get disconnected , un-map that drive?

I am connecting to a server via telnet and running the net use command to map a drive .

When the connection breaks, I re-login and need to map the same drive to a new drive letter . The old map is still there.

Any suggestions?

Thanks !



Sponsored Link
Ads by Google

Response Number 1
Name: Ron
Date: April 10, 2002 at 14:33:20 Pacific
Reply:

Create a batch file or add this to your logon script. I will use the drive letter F as an example.

@echo off
net use f: /delete
net use f: \\server\share


The first net use will delete any connection that is using the drive letter f and the second net use will remap a share to the f drive.


0

Response Number 2
Name: Dave C
Date: April 10, 2002 at 17:46:59 Pacific
Reply:

I agree and use the same commands in a batch file to disconnect and reconnect LPT1 to different network printers for a few users that I don't want messing with the settings.

Ron's instructions will do exactly what you want!


-Dave C


0

Response Number 3
Name: Cesare
Date: April 12, 2002 at 03:34:52 Pacific
Reply:

Hi,

I have created a batch file like this:

@echo off
net use f: /delete
net use f: \\server\share

and i have put it on \%systemroot%\system32\repl\import\ of a WindowsNT 4.0 server. All works properly.

But, where can i put this batch on Windows 2000 server for the same function ???

Many thanks
Cesare


0

Response Number 4
Name: Seal-X
Date: May 30, 2002 at 11:47:27 Pacific
Reply:

In the \SysVol\sysvol\domain.name\scripts folder.


\%systemroot%\system32\repl\import\ doesnt exist in W2k.


0

Sponsored Link
Ads by Google
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 2000 Forum Home


Sponsored links

Ads by Google


Results for: Login script to map and unmap a drive

Windows Services' Mapped Drives www.computing.net/answers/windows-2000/windows-services-mapped-drives/59480.html

login scripts to a partition other thanC www.computing.net/answers/windows-2000/login-scripts-to-a-partition-other-thanc/34560.html

login script www.computing.net/answers/windows-2000/login-script/13829.html