Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
VBScript that fails on a single machine...
Alright, I have written a script that runs on our domain at the office and automatically maps network drives when a user logs on based on group membership. For example, people in finance get a Q: drive for Quickbooks data, and people in sales get an S: drive to store and share their files. This works great on our machines, but one machine raises hell for some reason. Our web guy tried logging into the machine in our conference room (I just installed XP Pro on it and set it up) and got a message about an invalid parameter to "Join". This happened to me when I tried to log into said machine as well. The thing is, our finance and admin teams had NO errors whatsoever and it's working for them. We all have XP Pro running and a 2003 server. The script section that is giving the error is below.
' Create objects and extract strGroup values
Set objNetwork = CreateObject("WScript.Network")
Set objUser = CreateObject("ADSystemInfo")
Set CurrentUser = GetObject("LDAP://" & objUser.UserName)
strGroup = Join(CurrentUser.MemberOf)
strGroup = LCase(strGroup)
This works for the admin and finance teams and it works for most of us, but it's raising hell on one machine for some reason. Ideas?
0 · ·