Jump to content
EduGeek EdSec 2026 is Go! 27th Oct in Derby! Join us for a day of EdTech security focused talks, networking, and an evening social ×

Recommended Posts

Posted

I dont know if this is just us or its just a Windows quirk, but with a logon script to map drives, if I dont put NET USE \DELETE before every NET USE drive mapping, we sporadically get the old drives mapped, even though they arnt in the script anymore

 

For example I recently changed the admin logon script. It had NET USE /DELETE before each letter but as the new shares had been active for over a year, I thought it would just map the new ones. No such luck...just logged on and instead of the current share being mapped to M:\, I'm getting one that points to a non existant share and server that is long gone

 

Where on earth does it get this from? I cant imagine profile? The account in question has a mandatory profile anyway, so nothing could have been written to it.

Posted
Maybe it was previously mapped with /P:YES.

 

This sounds probable.

Had this a while back and had to use "net use * /DELETE /Y" from what I recall....

Posted

Here's what I found out about it:

 

{site} - Okay - here's what I have found...

If you map a drive "with" persistent connections, it appears in the registry under the key:

HKCU\Network\ (obviously, where drive letter is the mapped drive).

 

So it looks like it is stored in the user hive of the registry, maybe this is because of caching on the workstations in question. Are you using super mandatory profiles? (see wiki)

Posted
Could it be that some clients have old profiles stored locally? I tend to run delprof to make sure no stored profiles are causing any problems with any scripts I run.
Posted

I think Synack is on the right track here. I have seen it in our network as well.

To start off you can clean the registry of those mappings (just start regedt32 and import the users .DAt or .MAN file into a hive, change it, and save again) . However it could be a profile sync problem as well. (the pc grabs an "old" local profile if it can't grab the roaming one).

 

bio...

Posted

Hmm well it sounds like a persistant connection but I cant say Ive ever used that in a script in the 3 years Ive been here and all PC's will have been reimaged and profiles will have been cleared in that time so any old stuff should be long gone.

 

No big deal, Ill just use NET USE * /DELETE /Y - didnt know you could do that, was getting fed up of deleting each letter seperately - cheers Glenn

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...