AccessBlog.net

News, links, downloads, tips and tricks on Microsoft Access and related

About Me Search
Alex
Name:Alex Dybenko

Location:Moscow, Russia

Wednesday, January 28, 2015

Getting localized NT AUTHORITY domain name

If you are dealing with built-in system accounts, like NT AUTHORITY\SYSTEM, this code can help you on localized Windows versions, where NT AUTHORITY domain is also translated, for example to NT-AUTORITÄT in German version. You can get localized name using it SID "S-1-5-18":

?GetObject("winmgmts:root\cimv2").Get("Win32_SID.SID='S-1-5-18'").ReferencedDomainName

You have to use this function, when you select system object using Object selection dialog as well.

Labels: ,

0 Comments:

Post a Comment

<< Home