Would this be where your driving with this, Brian ?

break on

Function GetOwner($fileinput)
 dim $a[1]
 $GetOwner=0
 $wmiobj = GetObject("Winmgmts:")
 $SIDobj = $wmiobj.ExecQuery("ASSOCIATORS OF {win32_LogicalFileSecuritySetting='$fileinput'}
                               WHERE AssocClass=Win32_LogicalFileOwner ResultRole=Owner")
  For each $SID in $SIDobj
   $a[0] = $SID.AccountName
   $a[1] = $SID.ReferencedDomainName
   $GetOwner=$a
  Next
EndFunction

$file = "c:\temp"
$array = GetOwner($file)
?"AccountName=" $array[0]
?"DomainName=" $array[1]



-Shawn

{EDIT}

Guess you could do this as well:

Function GetOwner($fileinput)
 redim $GetOwner[1]

 ...

 For each $SID in $SIDobj
  $GetOwner[0] = $SID.AccountName
  $GetOwner[1] = $SID.ReferencedDomainName
 Next



--Shawn

[ 21 June 2002, 17:48: Message edited by: Shawn ]