Quote:

Trying to determine if this is a permissions issue.

Place the user account that does not work into the domain Adminstorators group. From the computer that you have been doing the previous testing, does the script work with th the user being a domain admin?




I tried this this morning and it didn't work. I double checked that the replication had gone through and it had. Domain Admins was not the answer...

In the meantime, with that piece of .VBS I have managed to insert a work around by modifying the VBS script to also look for computer accounts. I needed to get something in place because the entire script revolves around the OU info for the user and system - it is my brainchild and we will eventually be implementing it for 2500 users.

Code:

;Determine Computer OU
? Color $SC1 "- Querying Active Directory..."
$DN = TranslateName (3, "", 3, "@Domain\@wksta$", 1)
$DN = $DN[0]
:LOOKUPFAILED
$DN = split($DN,',DC=')[0]
$DN = Split($DN,',OU=')
$ubound = ubound($DN)
If $ubound > 1
$ComputerLOC = $DN[$ubound]
$secondLevel = $DN[$ubound-1]
If $ComputerLOC = 'HQ'
if instr('BIR;HAT;HFR',$secondLevel)
$ComputerLOC = $secondLevel
EndIf
EndIf
EndIf
If UBound($DN) > 0
Select
Case $DN[1] = "Metaframe" $ComputerLOC = "CITRIX"
Case $DN[1] = "Memphis" $ComputerLOC = "MER"
EndSelect
Else
? Color $SC3 "- Please Wait..." Color $SC1
Shell "%COMSPEC% /C cscript.exe /NoLogo @LDrive\Global\computerdn.vbs @wksta$ > %TEMP%\cdn.txt"
Shell "%COMSPEC% /C cscript.exe /NoLogo @LDrive\Global\userdn.vbs @USERID > %TEMP%\udn.txt"
$FH = FreeFileHandle()
$ = Open($FH, "%TEMP%\cdn.txt")
$DN = ReadLine($FH)
$ = Close($FH)
$FH = FreeFileHandle()
$ = Open($FH, "%TEMP%\udn.txt")
$LOOKUPFAILED = "1"
$DN2 = ReadLine($FH)
$ = Close($FH)
Goto LOOKUPFAILED
EndIf

;Determine User OU
If $LOOKUPFAILED <> "1"
$DN2 = TranslateName (3, "", 3, "@LDomain\@USERID", 1)
$DN2 = $DN2[0]
EndIf
$DN2 = split($DN2,',DC=')[0]
$DN2 = Split($DN2,',OU=')
$ubound = ubound($DN2)
If $ubound > 1
$USERLOC = $DN2[$ubound]
$secondLevel = $DN2[$ubound-1]
If $USERLOC = 'HQ'
if instr('BIR;HAT;HFR',$secondLevel)
$USERLOC = $secondLevel
EndIf
EndIf
EndIf



It works, but there is now obviously a dely as it shells out to run the VBS.

I am really curious as to why this is happening, and I would rather not go with the VBS solution long term.

Thanks for all of your help with this!


Edited by oobnuker (2005-06-02 09:25 PM)
_________________________
-- oobnuker - .KIX hack - no really.