?
Solved

Drive not mapping login script

Posted on 2011-09-16
4
Medium Priority
?
445 Views
Last Modified: 2012-05-12
I have a login script that maps drives for users: -
'// Map  drive
  If xuser = "auser" Then
  xNetwork.RemoveNetworkDrive "B:"
  xNetwork.MapNetworkDrive "B:", "\\server\share"
  objShell.NameSpace("B:").Self.Name = "Drive Name"
End If

This works for most users but one has problems and it only works occasionally.

Can anyone help?
0
Comment
Question by:HKFuey
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 30

Assisted Solution

by:Randy Downs
Randy Downs earned 2000 total points
ID: 36549034
You could try this

http://blogs.technet.com/b/grouppolicy/archive/2009/02/11/gp-preferences-will-reduce-logon-scripts-mapping-drives.aspx

GP Preferences will dramatically reduce your logon scripts

 GP Preferences has clean, easy-to-use reporting and UI

 

Lots of things get accomplished in scripts (mapped drives, set registry keys, managed devices, etc. )  GP Preferences can do all of that, plus you’ll be able to manage the setting in the UI, target your config with cool filtering, and use the reporting to see what you did. I’ll show you what I mean by using GP Preferences to map a drive.

 

Open up GPEdit for the GPO in question; click the ‘User Configuration’ folder, then click the ‘Preferences’ folder. You can see all of the user-relevant options you can set in Preferences. Find Drive Maps under ‘Windows Settings.’

Now right-click on Drive Maps and select ‘new’. You will see the dialog below: these drop down menus allow you to configure what you’ve been scripting, and more, in UI.

Here, I just filled in a couple things, the location (\\server\Users\%logonuser%) , the label (“User”), and the drive letter to use (“U:\”).
0
 

Author Comment

by:HKFuey
ID: 36549122
Hi number 1, will have a look next week when our techie gets back from hols.
0
 

Accepted Solution

by:
HKFuey earned 0 total points
ID: 36565825
In the script we were deleting then adding the mapped drive, I just removed the line that deleted it.
0
 

Author Closing Comment

by:HKFuey
ID: 36991249
Thanks for the help
0

Featured Post

Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You might have come across a situation when you have Exchange 2013 server in two different sites (Production and DR). After adding the Database copy in ECP console it displays Database copy status unknown for the DR exchange server. Issue is strange…
A procedure for exporting installed hotfix details of remote computers using powershell
This tutorial will walk an individual through the steps necessary to enable the VMware\Hyper-V licensed feature of Backup Exec 2012. In addition, how to add a VMware server and configure a backup job. The first step is to acquire the necessary licen…
This tutorial will show how to configure a new Backup Exec 2012 server and move an existing database to that server with the use of the BEUtility. Install Backup Exec 2012 on the new server and apply all of the latest hotfixes and service packs. The…
Suggested Courses

752 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