Jump to content

Recommended Posts

Posted (edited)

Hi all, happy new year.

 

What started off as a basic task has turned into a head scratcher.

 

I wanted to add a network drive to the logon script used by our staff "staff.bat"; two of our users need to access a folder on my machine, if I go to the users machine and manually map the network drive it works absolutely fine, until the machine is rebooted and then the drive disconnects.

 

Because of that I decided to create a custom logonscript for the required users "staffICT.bat, I copied the original script, made the changes I needed, saved the script and then updated the users AD profile asking it to use the new script "staffICT.bat" when logging on, but this fails to work.

 

I have been through all the GPO's to see the the network drives were being mapped elsewhere, but there is no mention of them anywhere in GP Editor.

 

I have run a gpupdate on all servers and the test machine I have been using, but to no effect.

 

I have also manually removed disconnected the network drives and restarted, and on reboot it re-maps the same 4 network drives it always did, no matter what changes I make to the logon script, as of now the script says to add no network drives what so ever, but if I manually disconnect them and reboot the machine, the same four drives are reconnected every time.

 

Any help will be much appreciated.

Edited by lquinnuk
clarity
Posted
Just to confirm are you using this script as a logon script or start up

 

Hi, sorry for not be clear, it's the logon script; under profile in the users AD entry.

 

Cheers.

Posted
the script dosent contain a net use x: /delete further down than your net use x: \\whatever\wherever does it?

 

no not at all, at the moment I have a new batch file just reading - "net use z: \\nm-pc\IT Scans"

 

Though when I run this in CMD it says "Logon failure : unknown user name or bad password, I've tried and used every which way to put the user name and password into the batch file, but no matter how I do it it then just gives me some details about proper syntax use, so it either.

 

A. says cannot connect because of bad password

 

or

 

B. displays syntax help information?

 

How ever if I manually map the drive through my computer, it's fine, no user name, no password, just maps straight away.

 

That said, the fact that this batch file isn't working is one thing, even if it was working, it still doesn't explain why the logon scripts don't seem to be working, as the same 4 network drives will ALWAYS re-map regardless of which logon script I specify in AD.

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