GP script problem

loik

New Member
Messages
1
I have a server 2003 based domain with 200, xp and win 7 clients. I am trying to set up a win 8 Pro client, I have most functions working but I'm having a strange problem with drive mapping via VBScript. The system gets the script and shows that it has the correct path but when the user clicks on the mapped drive he only gets part way there,
in the script sample below drives G, H, and S map and work correctly
Drives P, J display correctly but take you to \\docsvr2\data, like wise L takes you to \\docsvr2\Apps


sample code:

Dim CurrentUser
Dim StrGroups
Dim GroupMember
Dim wshNet
Dim grpNum
Dim strMessage


Set wshNet = CreateObject("WScript.Network")
Set ADSysInfo = CreateObject("ADSystemInfo")
Set CurrentUser = GetObject("LDAP://"&ADSysInfo.UserName)
Set CheckDrive = wshNet.EnumNetworkDrives()




driveLetters = Array("F:", "G:", "H:", "I:", "J:", "K:", "L:", "M:", "O:", "P:", "R:", "S:", "T:")
For Each driveLetter In driveLetters
On Error Resume Next
For intDrive = 0 To CheckDrive.Count - 1 Step 2
If CheckDrive.Item(intDrive) =driveLetter _
Then wshNet.RemoveNetworkDrive driveLetter
Next
Next




'standard drives everyone needs
with wshNet
.MapNetworkDrive "P:","\\docsvr2\data\USERS\Users\" & wshNet.username
.MapNetworkDrive "G:","\\docsvr2\vol1"
.MapNetworkDrive "H:","\\docsvr2\Vol2"
.MapNetworkDrive "J:","\\docsvr2\data\Users"
.MapNetworkDrive "L:","\\docsvr2\Apps\Departments"
.MapNetworkDrive "S:","\\DocSvr2\company"
end with

Is it a windows 8 problem, a VBS problem or the two just can;t play together?

Thanks
 

My Computer

System One

  • OS
    win 8
Back
Top