kosamja Posted February 12, 2017 Posted February 12, 2017 (edited) Is _Security__LookupAccountSid not working on Windows 10 or I dont know how to use it? I tried this example on windows 10 64 bit (default settings) and it always shows error. #NoTrayIcon #RequireAdmin #include <Security.au3> #include <SecurityConstants.au3> Local $aArrayOfData = _Security__LookupAccountSid('S-1-5-21-2516510968-2904199960-1983233263-500') ; Print returned data if no error occured If IsArray($aArrayOfData) Then MsgBox(0,'',"Account name = " & $aArrayOfData[0] & @CRLF) ConsoleWrite("Domain name = " & $aArrayOfData[1] & @CRLF) ConsoleWrite("SID type = " & _Security__SidTypeStr($aArrayOfData[2]) & @CRLF) Else MsgBox(0,'','error') EndIf Edited February 12, 2017 by kosamja
Subz Posted February 13, 2017 Posted February 13, 2017 Works fine for me WIndows 10 x64 Enterprise, are you sure your Sid is correct?
kosamja Posted February 13, 2017 Author Posted February 13, 2017 sid was incorrect, dont know how i missed that, thanks.
Darien Posted October 28, 2020 Posted October 28, 2020 I found that it only works with local accounts. It doesn't work with Samba accounts (it used to work). It may work with Active Directory accounts, but I don't have it here to test.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now