Windows Thread, Mapped Drives - not so mapped! in Technical; I have .bat files which determine the mapped drives for different groups of users (admin, teaching, care works etc).
For ...
-
11th March 2008, 12:22 PM #1
- Rep Power
- 0
Mapped Drives - not so mapped!
I have .bat files which determine the mapped drives for different groups of users (admin, teaching, care works etc).
For each group of users, a policy is in place that will map the drives automatically when the users log in.
This has worked fine for so long, but recently the drives don’t seem to be mapping anymore. I have not made any changes that may be causing this, all the policies and files are still in the relevant places.
I do, however, have a script for ALL users, which states the drives that everyone should have. These drives are also listed on their own department scripts. Could this be a reason for why it is doing it?
-
-
IDG Tech News
-
11th March 2008, 12:47 PM #2 What do you mean by this:
I do, however, have a script for ALL users, which states the drives that everyone should have. These drives are also listed on their own department scripts. Could this be a reason for why it is doing it?
Generally speaking, you have one logon script per group of users as they're all accessing the same resource(s). Logon scripts should be in your NETLOGON share.
If you type \\SERVERNAME\NETLOGON you can verify this. Sometimes network drives don't map due to loss of connectivity or that there's a problem with permissions.
-
-
11th March 2008, 01:12 PM #3
- Rep Power
- 0
Hi
I am aware of the netlogon share as that is where I create any new scripts.
What I eant by that quote was that I have a script which applies for all users, which runs when the log in. I also have scripts for all the different departments... There is some doubling of content eg "net use r: \\server\ppil_data$ \y" which will appear in the script for all users as wll as the script for a department.
The reason for this is because there are some departments that don't have their own logon scripts because they don't have particular drives that need mapping just for them. Tey only need the generic ones.
-
-
11th March 2008, 01:17 PM #4 I'd probably get rid of the doubling up if you can. Edit your scripts so you have the common drives being mapped, then any additional user-specific mappings applied afterwards. Dunno why you're seeing this problem though, never had experience of things not getting mapped for anything other than temporary network connectivity blips.
-
-
11th March 2008, 01:23 PM #5 are you deleting all shares before you add new ones?
-
-
11th March 2008, 01:24 PM #6 I agree with Ryan, get rid of the doubling. What I wrote regarding logon scripts was just a typical example. There's no reason why (in theory) each user could have a different logon script.
You can copy an existing script (say Staff1.bat) and name it Staff2.bat. Then make the change in Active Directory for that user too.
-
-
11th March 2008, 01:31 PM #7
- Rep Power
- 12
Could it be that the clients are connecting too quickly? Are they new machines that are having the mapping problem? I have had similar problems in the past but was generally down to network problems. Have you got the clients waiting for the network on boot set in the GPO?
-
-
11th March 2008, 01:32 PM #8
- Rep Power
- 0
I have got rid of the script for all users, and just amended each department so that they have all the relevant drives they need, as wel as all the common ones.
My scripts do not delete the drives before adding new ones.
Sorry about typing sometimes - keyboard is really playing up today.
-
-
11th March 2008, 01:35 PM #9
- Rep Power
- 0
The scripts are all in the \\server\netlogon folder and are forced to run in GP under User config - windows settings - Scripts - Logon
-
-
11th March 2008, 01:38 PM #10 Just before mapping the drives, place this in your logon script:
Code:
net use I: /delete /y
net use J: /delete /y
net use K: /delete /y
net use L: /delete /y
net use M: /delete /y
net use N: /delete /y
net use O: /delete /y
net use I: \\SERVERNAME\drive1
net use J: \\SERVERNAME\drive2
net use K: \\SERVERNAME\drive3
net use L: \\SERVERNAME\drive4
net use M: \\SERVERNAME\drive5
net use N: \\SERVERNAME\drive6
net use O: \\SERVERNAME\drive7
Change the letters with the letters you're using to map network drives.
Last edited by Michael; 11th March 2008 at 01:40 PM.
-
-
11th March 2008, 01:43 PM #11 
Originally Posted by
LeonieCol
I have got rid of the script for all users, and just amended each department so that they have all the relevant drives they need, as wel as all the common ones.
My scripts do not delete the drives before adding new ones.
Sorry about typing sometimes - keyboard is really playing up today.
this will be the problem, when a user logs of it doens't always delete the share, so when you try to map a new share it will look at the existing one and not map a new drive. if you use the script below to delete before you add , where p s and z are the drive names.
net use p: /d
net use s: /d
net use z: /d
-
-
11th March 2008, 02:00 PM #12
- Rep Power
- 10
Double-check that the CD/DVD drive letter is set properly. We had a prob where the user homeshare wouldn't map (drive letter h
turns out the DVD drives on the HP desktops had decideded to become H: and thus the net use command failed.
-
-
11th March 2008, 02:11 PM #13
- Rep Power
- 0
Thanks guys, I have added the delete into the scripts and I will test it out and see where I am.
Does it matter whether I use /delete or /d?
-
-
12th March 2008, 02:20 PM #14
Leonie
From what i can gather from reading other peoples posts, most people seam to agree that its is a combination of stacking more than one bat file and/or not disconnecting the mapped drives before it remaps the new ones.
Have you thought about instead of using a vbs script to map your drives instead of a batch file. The using the GPO to deploy it, here is an example of the one i use and i can stack multiple scripts without them interferring with each other.
__________________________________________________ _____________
sample.vbs
__________________________________________________ _____________
On Error Resume Next
Dim net
Set net = CreateObject("WScript.Network")
net.MapNetworkDrive "S:", "\\server1\share"
mDrive = "S:\"
Set oShell = CreateObject("Shell.Application")
oShell.NameSpace(mDrive).Self.Name = "Shared Folder"
__________________________________________________ _____________
This script also in the second part makes the mapped drives look neater in 'my computer', and from what i can tell runs quicker than a .bat file.
Been running it on our systems for over 2 years and never had a problem with it.
Good luck, Hope this helps
Justin
-
-
12th March 2008, 03:19 PM #15
- Rep Power
- 0
Thanks Justin, that's great. I have tested it with one drive and it seems to do the trick... now to just get the rest of the lists in!
I would also like to do that with networked printers, I presume it will be that simple, too?!
-
SHARE:
Similar Threads
-
Replies: 2
Last Post: 30th January 2008, 11:18 AM
-
By Grommit in forum Windows
Replies: 12
Last Post: 28th January 2008, 04:15 PM
-
By proby1 in forum Windows Vista
Replies: 2
Last Post: 15th November 2007, 11:39 AM
-
By marco84 in forum Educational Software
Replies: 11
Last Post: 8th June 2007, 11:21 AM
-
By timbo343 in forum Windows
Replies: 4
Last Post: 7th December 2005, 09:09 PM
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules