Old Network Drives Stay after Script

G

Guest

We map all network drives with login scripts. When we move a network drive
to a different server and change the login script, the network drives for the
clients still point to the old server. We have to disconnect the drive in
question and relogin and then the script will do it's work. It's like XP
remembers where the drive was in the past even though the script says
something different. Are there any commands in the script to make sure the
script takes effect? I've seen this on several network work the same. I
wondering how people get around this. Delete all drives somehow before the
script executes?? Force what's in the script to take effect?? This is on XP
and 2000 and 2003 servers. Any help is appreciated.
 
G

Guest

I actually tried that before I posted initially. Couple questions. Is there
a switch so the login script doesn't stop and wait for a Y or N to continue.
A quiet mode switch. Second, I'm not certain and I'm pretty sure it's not
fixing my problem. If my old script had 4 drives mapped and I went ahead and
mapped 2 more manual and said to reconnect at logon, the net use * /delete
switch appears to see the the 2 drives that were manually mapped, but it
doesn't see the other 4 that came from login script. Which actually makes
sense since the 4 haven't been mapped yet with the login script just
starting, but somewhere XP is saving the info from the 4 drives and not
letting the new script take effect.. Hopefully that isn't too confusing.
Thanks for the help.
 
A

Asher_N

vbs code snippet to remove and add network drives:

Set wshNetwork = CreateObject("WScript.Network")
Set oShell = CreateObject("Wscript.Shell")

wshnetwork.RemoveNetworkDrive "F:"
wshnetwork.RemoveNetworkDrive "G:"

wshNetwork.MapNetworkDrive "F:", "\\NTS1\Apps"
wshNetwork.MapNetworkDrive "G:", "\\NTS1\dept"

The only time the remove does not seem to work is when the drives were
mapped manualy
 
B

Bob I

I think the problem is that you are setting the reconnect at login AND
scripting. Don't set reconnect at login, only use the script to do the
mapping.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top