Jump to content

Recommended Posts

Posted

I am in the throws of finishing a network migration to some new servers as our old one is quite frankly knackered. I have moved various different areas to different servers and I am now trying to get the logon script to map to the new locations.

 

The new log on script reads..........

 

@echo off

REM "Removal of existing drive mappings"

 

if exist B:\ net use B: /d /y

if exist F:\ net use f: /d /y

if exist G:\ net use g: /d /y

if exist H:\ net use h: /d /y

if exist I:\ net use i: /d /y

if exist J:\ net use j: /d /y

if exist K:\ net use k: /d /y

if exist L:\ net use l: /d /y

if exist M:\ net use m: /d /y

if exist N:\ net use n: /d /y

if exist O:\ net use o: /d /y

if exist P:\ net use p: /d /y

if exist Q:\ net use q: /d /y

if exist R:\ net use r: /d /y

if exist S:\ net use s: /d /y

 

Rem "Map new drives"

 

net use N: "\\Servername\Shared Applications"

net use O: "\\Servername\staff shared area"

net use B: "\\Servername\Windows Installer Fix"

net use P: "\\servername\Student Temporary Folder"

net use H: "\\Servername\sims"

 

When mapping O: it says it is already in use but it shouldnt be it should have been removed. All the other drives do get removed. The only way I can find of sorting this is restting everones profile. But I dont want to have to do that. To much hassle to many (L)users. Please help.

 

The existing L K and Q drives don't unmap but the B and N drives do.

 

The names of the servers have been changed to protect the innocent!!

Posted

Right.

 

I have worked out if I delete the NTUSER.DAT file the problem goes away apart from the problem that it also removed god dam outlook profile.

 

Any other suggestions anyone.

 

Thanks

Posted

I dont know if it will help but

 

net use * /delete /yes

 

is a little simpler (and i would assume quicker to process). This will clear any existing mappings.

Posted

net use * /delete /yes

 

 

now wish i had known that pass two days been creating a server network with out the server for friend i.e what they want is a 2003 server but they havnt got it so trying to put something together for them on a peer to peer network for them...

 

russ

Posted
You could also try using VBScript to remove the mappings and remake them. In theory it shouldn't be any different but you know what theory did... ;)
Posted

Thanks all for youre suggestions.

 

I have tried the VBS route and it did not work. I did this last night as a last ditch attempt at killing the dam thing.

 

I have added the \persistant:no swith in to the script but the drives still remain mapped. I have a funny feeling this needed to be run the first time the script was used when people logged in.

 

Man so frustrating.

 

When will people invent the button which says just F****N work!!

Posted
I have a funny feeling this needed to be run the first time the script was used when people logged in.

 

This kind of thing is in the userprofile. Nuke the profiles on the machines with delprof.

Posted

Think I had this once had this too.

 

Using your fave reg editing tool (I prefer Resplendent Registrar) you can remove the corrisponding registry keys in the ntuser.dat from

ntuser.dat\Software\Microsoft\Windows NT\CurrentVersion\Network\Persistent Connections

 

Or maybe script the removal - not tried that one myself.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...