How to get path of specified HKEY

How to get path of specified HKEY

Post by Adam Badur » Sat, 16 May 2009 17:59:19



Is there any way to get for specified HKEY the path to it in its
registry? It is quite easy for predefined keys as there are only few of them
and they can be checked with few ifs. However what about any arbitrary HKEY?

Adam Badura
 
 
 

How to get path of specified HKEY

Post by Adam Badur » Sat, 16 May 2009 18:08:15

> Is there any way to get for specified HKEY the path to it in its

Or maybe at least the name of HKEY alone?

Adam Badura

 
 
 

How to get path of specified HKEY

Post by Volodymyr » Sun, 17 May 2009 00:09:48

I suppose you can get the object handle name using NtQueryObject which is
"This function may be changed or removed from Windows without further
notice." according to Microsoft
( http://www.yqcomputer.com/ (VS.85).aspx). You can use
it at your own risk.

--
Volodymyr M. Shcherbyna, blog: http://www.yqcomputer.com/
(This posting is provided "AS IS" with no warranties, and confers no
rights)
 
 
 

How to get path of specified HKEY

Post by Pavel A » Sun, 17 May 2009 06:02:30

There is no win32 API for this.
NtQueryKey with KeyNameInformation will do this.

-- pa
 
 
 

How to get path of specified HKEY

Post by Step » Sun, 17 May 2009 18:33:21


XXXX@XXXXX.COM ...

Of course there are apis (always...)
See google groups archives.
 
 
 

How to get path of specified HKEY

Post by danie » Sun, 17 May 2009 19:27:09


The only documented interfaces I'm aware of are kernel routines such as
ZwQueryKey and ObQueryNameString. We already saw Google, so please tell us
which.

//Daniel