Link to home
Start Free TrialLog in
Avatar of Tacobell2000
Tacobell2000Flag for Canada

asked on

vbs script for mapping network folders

Hello,

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,

Tacobell2000
ASKER CERTIFIED SOLUTION
Avatar of cfairley
cfairley
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Debsyl99
Debsyl99

Hi
"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
http://www.microsoft.com/windows2000/techinfo/reskit/tools/existing/gpresult-o.asp

Deb :))
Hi Tacobell - just realised it was you :))
Avatar of Tacobell2000

ASKER

Hello,

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.

Tacobell2000
No probs :))