Advertisement

09.07.2007 at 06:57AM PDT, ID: 22813344
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

7.2

VBS Script for removing and mapping drives, also home directory

Asked by cjlocy in VB Script, Active Directory, Microsoft Server

Tags: ,

OK I am trying to run a VBS script at login to remap all the users drives to a NAS server since we are low on space. This is the script I am trying and the problem is that it does not disconnect the drives that are already mapped it only connects the ones that are not mapped already. Also can not get the program script to disconnect the drives and the users personal drive and when I try to do it get an error saying Launch Explorer Check H
These are my current drives that are mapped for everyone:
H:\\denfile4\personalfolder
J: \\denfile4\photos
N: \\denfile4\Navision
 P: \\denfile4\public
q: \\denfile4\quality

Here is the script I am trying to run:

Option Explicit
Dim objNetwork, objUser, CurrentUser
Dim strGroup

Const All_Users_Group = "cn=oly_users_all"

Set objNetwork = CreateObject("WScript.Network")
' Forces script to skip errors (rem below line to see errors)
on error resume next

Dim WshNetwork
Set WshNetwork = WScript.CreateObject("WScript.Network")
' Set all drives to be removed here.
WshNetwork.RemoveNetworkDrive "H:"
WshNetwork.RemoveNetworkDrive "I:"
WshNetwork.RemoveNetworkDrive "J:"
WshNetwork.RemoveNetworkDrive "K:"
WshNetwork.RemoveNetworkDrive "L:"
WshNetwork.RemoveNetworkDrive "M:"
WshNetwork.RemoveNetworkDrive "N:"
WshNetwork.RemoveNetworkDrive "O:"
WshNetwork.RemoveNetworkDrive "P:"
WshNetwork.RemoveNetworkDrive "Q:"
WshNetwork.RemoveNetworkDrive "R:"
WshNetwork.RemoveNetworkDrive "S:"
WshNetwork.RemoveNetworkDrive "T:"
WshNetwork.RemoveNetworkDrive "U:"
WshNetwork.RemoveNetworkDrive "V:"

Set objUser = CreateObject("ADSystemInfo")
Set CurrentUser = GetObject("LDAP://" & objUser.UserName)
strGroup = LCase(Join(CurrentUser.MemberOf))

' SETTING ALL NETWORKDRIVES THAT ARE AVAILABLE FOR EVERY USER
 objNetwork.MapNetworkDrive "H:", "\\NAS1100\Users\%username%"
 objNetwork.MapNetworkDrive "I:", "\\NAS1100\BankStatements"
 objNetwork.MapNetworkDrive "J:", "\\NAS1100\Photos"
 objNetwork.MapNetworkDrive "K:", "\\NAS1100\FareoInvoices"
 objNetwork.MapNetworkDrive "L:", "\\NAS1100\FIC"
 objNetwork.MapNetworkDrive "M:", "\\NAS1100\FRD"
 objNetwork.MapNetworkDrive "N:", "\\NAS1100\Navision"
 objNetwork.MapNetworkDrive "P:", "\\NAS1100\Public"
 objNetwork.MapNetworkDrive "Q:", "\\NAS1100\QA"
 
But it does not disconnect all the drives and does not remap the personal folder of the user...Need Help

Thanks

Start Free Trial
[+][-]09.07.2007 at 08:09AM PDT, ID: 19848341

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.07.2007 at 11:45AM PDT, ID: 19850090

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.07.2007 at 03:12PM PDT, ID: 19851316

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.07.2007 at 09:03PM PDT, ID: 19852310

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.10.2007 at 06:11AM PDT, ID: 19860624

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.10.2007 at 04:31PM PDT, ID: 19865052

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.10.2007 at 07:34PM PDT, ID: 19865586

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.27.2007 at 09:35AM PDT, ID: 20161989

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10.28.2007 at 01:42PM PDT, ID: 20166286

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12.11.2007 at 07:56PM PST, ID: 20454888

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]12.16.2007 at 07:57PM PST, ID: 20482788

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: VB Script, Active Directory, Microsoft Server
Tags: vbs, script
Sign Up Now!
Solution Provided By: Computer101
Participating Experts: 4
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628