Hi,
this module allows to check whether Registry Key is:
- Shared
- Redirected
- Usual
- Symlink
And to show a target of symlink.
Note: Reflected type of keys (OS Vista and older only) are not considered.
RegGetKeyVirtualType() function returns a bitmask of KEY_VIRTUAL_TYPE enum.
Example of using is inside.
For most and reliable operation results elevated privilages required.
References:
There is also a short article in Russian about such keys I wrote a long time ago, available here.
See also:
MSDN. Registry Keys Affected by WOW64
MSDN. Accessing an Alternate Registry View
MSDN. Registry Reflection
MSDN. [MS-RRP] Symbolic Links
Stefan Kuhr. Registry Symbolic Links creation tool.
Jeremy Hurren. Registry Filters and Symbolic Links
Paula Tomlinson. Understanding NT
I must warn that the table of virtual types for some keys presented on MSDN page is wrong.
Also, some information how to open and work with symlinks are incomplete. See my code on how to do it reliable.
this module allows to check whether Registry Key is:
- Shared
- Redirected
- Usual
- Symlink
And to show a target of symlink.
Note: Reflected type of keys (OS Vista and older only) are not considered.
RegGetKeyVirtualType() function returns a bitmask of KEY_VIRTUAL_TYPE enum.
Example of using is inside.
For most and reliable operation results elevated privilages required.
Code:
Dim kvt As KEY_VIRTUAL_TYPE
...
kvt = RegGetKeyVirtualType(HKLM, "SOFTWARE\Classes\AppID", sSymLinkTarget)
If kvt And KEY_VIRTUAL_NOT_EXIST Then sKeyType = "Not exist"
If kvt And KEY_VIRTUAL_USUAL Then sKeyType = "Usual"
If kvt And KEY_VIRTUAL_SHARED Then sKeyType = "Shared"
If kvt And KEY_VIRTUAL_REDIRECTED Then sKeyType = "Redirected"
If kvt And KEY_VIRTUAL_SYMLINK Then sKeyType = sKeyType & " (Symlink)" & " -> " & sSymLinkTarget
...
There is also a short article in Russian about such keys I wrote a long time ago, available here.
See also:
MSDN. Registry Keys Affected by WOW64
MSDN. Accessing an Alternate Registry View
MSDN. Registry Reflection
MSDN. [MS-RRP] Symbolic Links
Stefan Kuhr. Registry Symbolic Links creation tool.
Jeremy Hurren. Registry Filters and Symbolic Links
Paula Tomlinson. Understanding NT
I must warn that the table of virtual types for some keys presented on MSDN page is wrong.
Also, some information how to open and work with symlinks are incomplete. See my code on how to do it reliable.