Batch/ADM Template to map network drives

Posted on 2009-05-27
Medium Priority
Last Modified: 2012-06-27
Dear folks,

Short question - hope so...;

I've some uses which complain about problems with network drives when they're out of the office with their notebooks.
When they're out of the office and disconnects the mappings, everything works faster than before.

Today, we're going to map different letters with network pahts.
The batch file will at first delete all mappings and then establish them correctly.

1.) Which version do you prefer to map network drives?
- Batch-Files

2.) How I can prevent the users complain about the performance?
I've think about to enhance the batch file with a first query to check if they're in the business network (ping fileserver)
and then connect the letters to the network drives.

Do you prefer an other way to solve this?

thanks, regards
Question by:olmu
  • 3
  • 3
LVL 27

Expert Comment

ID: 24482246
I would say mapping drives via a script is what you want. I suppose it's possible to do via ADM/registry, never really consiered it to be honest, but it's going to simpler to script it (this is a typical task carried out by login scripts). Apply the  script via group policy.

Actually you can control drive mappings by location using group policy as well without having to run a ping test in the script (if this timesout there'll be a hit on performance).

Will all users get the same mappings when logging on to the company network, or will different users get different mappings?

Author Comment

ID: 24482340
Hi bluntTony
All users will have the same mappings.
But I will setup a login script only for notebook users, so they will become an own login script.
No problem so far.

Can you give me an example how to perform a useful script which>
- only maps the network drive when they're in the internal network? (i.e. ping the fileserver, ...)
- when they're out of the network, no mapping should be tried

Can you explain me what you mean with>
Actually you can control drive mappings by location using group policy as well without having to run a ping test in the script (if this timesout there'll be a hit on performance).

What you mean with 'location using group policy' ? Where to identify?

thank you
LVL 27

Expert Comment

ID: 24482654
Sorry I may have slightly misunderstood.

Where are you storing the login script? For example, if it's in the NETLOGON share, then users not connected will not be able to run it anyway as they have no access to the share, so no mappings will be attempted.

What exactly is the problem your users are getting?
Creating Active Directory Users from a Text File

If your organization has a need to mass-create AD user accounts, watch this video to see how its done without the need for scripting or other unnecessary complexities.


Author Comment

ID: 24482902
They've some delay when they're working with excel or word, any delay in the explorer, ...
When they disconnect the login-scripts, it seems to work fine.

Ok, then i suggest, that i should create a logoff script which will disconnect the mappings.
At next logon internally, the drives would be connected successfully.
When they're out of the office, no mapping will be performed becuase no batch can be loaded.

Yes the batch files are stored on the netlogon share.

Important question
We use WinXP. Now ... batch files would not be locally cached? That's important to now for this procedure, else it will not work.

thank you
LVL 27

Accepted Solution

bluntTony earned 1500 total points
ID: 24495493
No, in XP, logon scripts are not cached. If the network is not available then a logon script will not run.

Author Closing Comment

ID: 31585711
ok, done, thx for your informations

Featured Post

Get 10% Off Your First Squarespace Website

Ready to showcase your work, publish content or promote your business online? With Squarespace’s award-winning templates and 24/7 customer service, getting started is simple. Head to Squarespace.com and use offer code ‘EXPERTS’ to get 10% off your first purchase.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Microsoft Office 365 is a subscriptions based service which includes services like Exchange Online and Skype for business Online. These services integrate with Microsoft's online version of Active Directory called Azure Active Directory.
Sometimes it necessary to set special permissions on user objects.  For instance when using a Blackberry server, the SendAs permission needs to be set. I see many admins struggle with the setting that permission only to see it disappear within a few…
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

624 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question