According to the documentation for API function GetNamedSecurityInfo
开发者_Go百科, it can get information from the following objects:
- Local or remote files or directories on an NTFS file system
- Local or remote printers
- Local or remote Windows services
- Network shares
- Registry keys
- Semaphores, events, mutexes, and waitable timers
- File-mapping objects
- Directory service objects
But what I need is to get information from a registry key on a remote computer. Can GetNamedSecurityInfo
obtain that somehow?
Sure it can. Just pass the name of the key.
\\ComputerName\CLASSES_ROOT\SomePath
Format of object names are described in the documentation for SE_OBJECT_TYPE enumeration. Note that there are some caveats related to authentication/authorization, read the documentation for RegConnectRegistry as well.
精彩评论