(imported topic written by gabattil91)
Hi All,
I would like to ask some help to read the SID ID of a domain user. The goal would be to check the size of the machine owner’s Recycle Bin. I can do that when a user is logged on, but the machine owner and the logged on user is not necessarily the same person
Here is the code which will show the size of the logged on user’s Recycle Bin. :
if name of it of logged on user != “” Then (if exists folder (concatenation “” of (“C:\RECYCLER”;(substrings separated by “” of following text of first “RECYCLER” of (value “Path” of key “Software\Microsoft\Windows\CurrentVersion\Explorer\BitBucket@” of (key whose ((it = name of current user as lowercase OR it starts with name of current user as lowercase & “@” ) of (it as string as lowercase) of value “Logon User Name” of key “Software\Microsoft\Windows\CurrentVersion\Explorer” of it) of key “HKEY_USERS” of registry) as string) whose (it contains “RECYCLER”)))) then sum of sizes of files of folder (concatenation “” of (“C:\RECYCLER”;(substrings separated by “” of following text of first “RECYCLER” of (value “Path” of key “Software\Microsoft\Windows\CurrentVersion\Explorer\BitBucket@” of (key whose ((it = name of current user as lowercase OR it starts with name of current user as lowercase & “@” ) of (it as string as lowercase) of value “Logon User Name” of key “Software\Microsoft\Windows\CurrentVersion\Explorer” of it) of key “HKEY_USERS” of registry) as string) whose (it contains “RECYCLER”))))as string else (“Recycle Bin does not exist”)) else (“Nobody is Logged On”)
So the question…How could I get the SID ID of a domain user?
Thanks for the help
Regards,
Attila