Windows XP Community - XPHeads



Find localized name of a the LocalSystem account (NT AUTHORITY\SYSTEM)

microsoft.public.windowsxp.wmi


Reply
  #1 (permalink)  
Old 05-06-2008, 08:23 AM
Boaz Ben-Porat
 
Posts: n/a
Find localized name of a the LocalSystem account (NT AUTHORITY\SYSTEM)
We need to find the localized name of the LocalSystem account. Onenglish
windows it is 'NT AUTHORITY\SYSTEM', but on other OSs it is something else.
(e.g. In German it is 'NT AUTHORITÄT\SYSTEM )

The SID of the LocalSystem account is S-1-5-18', so we tried using
Win32_Group class/table with SID='S-1-5-18' (On an english Windows). The
Name property is 'SYSTEM', but 'NT AUTHORITY' is not found in any member of
the Win32_Group.

How do we get the full name of an account?

TIA

Boaz Ben-Porat
Milestone systems




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 05-07-2008, 04:51 PM
urkec
 
Posts: n/a
RE: Find localized name of a the LocalSystem account (NT AUTHORITY\SYS
"Boaz Ben-Porat" wrote:

> We need to find the localized name of the LocalSystem account. Onenglish
> windows it is 'NT AUTHORITY\SYSTEM', but on other OSs it is something else.
> (e.g. In German it is 'NT AUTHORITÄT\SYSTEM )
>
> The SID of the LocalSystem account is S-1-5-18', so we tried using
> Win32_Group class/table with SID='S-1-5-18' (On an english Windows). The
> Name property is 'SYSTEM', but 'NT AUTHORITY' is not found in any member of
> the Win32_Group.
>
> How do we get the full name of an account?
>
> TIA
>
> Boaz Ben-Porat
> Milestone systems
>
>
>
>
>



Try Win32_SID. This class can not be enumerated, so you can't use a query.
This code gives "NT AUTHORITY\SYSTEM" (I can't test it on a localized Windows
system)


' VBScript source code

Set objWMI = GetObject _
("winmgmts:root\cimv2")

Set objSid = objWMI.Get _
("Win32_SID.SID='S-1-5-18'")

WScript.Echo objSid.ReferencedDomainName _
& "\" & objSid.AccountName


--
urkec
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 01:49 PM.








Design by Vjacheslav Trushkin for phpBBStyles.com.
Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74