Getting localized name of "NT AUTHORITY\System"
Hello
We have customers with different locale settings.
We need to use "NT AUTHORITY\System" user for a service
but it is localized for different locales.
I searhed about it and found that its SID is
S-1-5-18.
and tried using its sid to get localized name, but couldnt succeed it.
What I tried is (code by kichik)
System::Call "*(&i1 0, &i4 0, &i1 5) i.r0"
# System::Call "advapi32::AllocateAndInitializeSid(i r0, i 2, i 32 , i 544, i 0, i 0, i 0, i 0, i 0, i 0, *i .r1)"
; commented one works
System::Call "advapi32::AllocateAndInitializeSid(i r0, i 2, i 18 , i 0, i 0, i 0, i 0, i 0, i 0, i 0, *i .r1)"
System::Free $0
System::Call advapi32::ConvertSidToStringSid(ir1,*t.R0)
DetailPrint "sid $R0"
StrCpy $R0 ${NSIS_MAX_STRLEN}
System::Call "advapi32::LookupAccountSid(i 0, i r1, t .r0, *i R0, t .r2, *i R0, *i .r3)"
System::Call "advapi32::FreeSid(i r1)"
DetailPrint " Result $0"
I tried it for different acounts, it works
currently it doesnt work for special groups that mentioned below
http://support.microsoft.com/kb/163846
I think problem is having 3 numeric part, it works with 4 digit part sids like S-1-5-32-544
also I got usefull information from thread
http://forums.winamp.com/showthread....hreadid=243303
thanks for help
Selim