Is there a way to connect between the values under HKEY_USERS to the actual username?
I saw some similar questions, but most (if not all) talks about C# code, and my need is in VBScript.
相关问题
- How to Debug/Register a Permanent WMI Event Which
- Inheritance impossible in Windows Runtime Componen
- how to get running process information in java?
- Is TWebBrowser dependant on IE version?
- How can I have a python script safely exit itself?
相关文章
- 如何让cmd.exe 执行 UNICODE 文本格式的批处理?
- 怎么把Windows开机按钮通过修改注册表指向我自己的程序
- Warning : HTML 1300 Navigation occured?
- Bundling the Windows Mono runtime with an applicat
- Windows 8.1 How to fix this obsolete code?
- CosmosDB emulator can't start since port is al
- How to print to stdout from Python script with .py
- Determine if an executable (or library) is 32 -or
By searching for my userid in the registry, I found
It is possible to query this information from WMI. The following command will output a table with a row for every user along with the SID for each user.
You can also export this information to CSV:
I have used this on Vista and 7. For more information see WMIC - Take Command-line Control over WMI.
You can use the command PSGetSid from Microsoft's SysInternals team.
Download URL: http://technet.microsoft.com/en-gb/sysinternals/bb897417.aspx
Usage:
Example:
NB:
Update
If you use PowerShell, the following may be useful for resolving any AD users listed:
You could also refine the SID filter further to only pull back those SIDs which will resolve to an AD account if you wished; more on the SID structure here: https://technet.microsoft.com/en-us/library/cc962011.aspx
In the
HKEY_USERS\oneyouwanttoknow\
you can look at\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders
and it will reveal their profile paths.c:\users\whothisis\Desktop
, etc.If you look at either of the following keys:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\hivelist
You can find a list of the SIDs there with various values, including where their "home paths" which includes their usernames.
I'm not sure how dependable this is and I wouldn't recommend messing about with this unless you're really sure what you're doing.