VBScript that fails on a single machine... - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

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...

SephirothSephiroth Fayetteville, NC, USAPosts: 1,035Member
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.
[code]
' 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)
[/code]
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?

-[italic][b][red]S[/red][purple]e[/purple][blue]p[/blue][green]h[/green][red]i[/red][purple]r[/purple][blue]o[/blue][green]t[/green][red]h[/red][/b][/italic]
Sign In or Register to comment.