Argh! Mental confusion abounds here...


$Win32Admin = createobject("Win32Admin")
if vartypename($Win32Admin) <> "Object"
? "@serror"
endif

$Version = $Win32Admin.Version
if @error <> 0
? "@serror"
endif
? "DLL Version = " + $Version

; Method GetAdminAccount()
; Returns the name of the local BUILTIN\Administrator account.
; This method is valuable when trying to locate an account that
; has been renamed or is not 'Administrator' because of OS
; language localization.
$Account = $Win32Admin.GetAdminAccount("ComputerName");
if $Account = ""
? "@serror"
endif
? "BUILTIN\" + $Account

$Win32Admin = 0


[ 13. August 2003, 03:03: Message edited by: Howard Bullock ]
_________________________
Home page: http://www.kixhelp.com/hb/