vbs script for mapping network folders

Posted on 2004-11-25
Medium Priority
Last Modified: 2010-04-13

I am managing a network of 250 users and 15 servers. I copied a script in vbs and created a test OU and put the script under the logon icon in group policy. Then i put myself in the container and my computer in the OU. I logoff the server and reboot my computer. Once i logon to my computer i get an error message stating that  "an attempt was made to remember a drive that had previously been remembered" . I then go to the OU in question and go into group policy and enable the "no override" link option check box. I did this because there is a logon script at the domain level that maps drives for users throughout the domain. The vbs script that I am having a problem with on the server at the OU level works fine because i double clicked it on my desktop and all the drive mappings are created.
Here is the script:

Dim objNet

Set objNet = CreateObject("Wscript.Network")

objNet.MapNetworkDrive "G:", "\\sdc2fp00\labrma00$"
objNet.MapNetworkDrive "H:", "\\sap3p600\ttplus$"
objNet.MapNetworkDrive "I:", "\\sap3p600\cdi$"
objNet.MapNetworkDrive "J:", "\\sdc2fp00\corporate$"
objNet.MapNetworkDrive "K:", "\\sap3p600\monarch$"
objNet.MapNetworkDrive "W:", "\\sap3p600\cinfo$"

My question is by enabling  the "no override" option in group policy I am preventing domain logon scripts to run at the specific OU. If this is so then why does this script not work at the OU level?

Please help,

Question by:Tacobell2000
  • 3
LVL 11

Accepted Solution

cfairley earned 1500 total points
ID: 12676834
You have to turn on Block Inheritance on the OU to block policy settings set on higher OUs.  Keep in mind that this will prevent all settings from parents OUs.  Also, if the Parent OU has No Override set, then you cannot block it.
LVL 20

Expert Comment

ID: 12676987
"I Then i put myself in the container and my computer in the OU" - The user account that you are loggin on with also needs to reside in that OU - If the script is a logon script it only applies to users in the OU, not computers, so it makes no difference if your computer is in there or not in relation to user configuration settings on that gpo. I mention this because it sin't clear where your user account is in relation to that OU (which container is it in?).You may also need to run
secedit /refreshpolicy user_policy
from a command prompt on the server to get the policy replicated across the dc's. You can also use this tool to check on the policy application and any conflicts/overrides on the pc you are logging in to,
Gpresult.exe: Group Policy Results

Deb :))
LVL 20

Expert Comment

ID: 12676992
Hi Tacobell - just realised it was you :))

Author Comment

ID: 12677034

Hey Debsyl99. I have figured out what was wrong with the configuration. Basically i had to delete all previous client mapping on the user's computer and then I had to log onto the server and choose the properties of the user and under profile delete the logon script. Then i rebooted the users computer and bingo.....everything works beautifully.
I have asked the moderators to close the question.

LVL 20

Expert Comment

ID: 12677080
No probs :))

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
MSSQL DB-maintenance also needs implementation of multiple activities. However, unprecedented errors can hamper the database management. In that case, deploying Stellar SQL Database Toolkit ensures fast and accurate database and backup repair as wel…
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Suggested Courses
Course of the Month16 days, 6 hours left to enroll

850 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