Page 1 of 1

listing subkeys and values

Posted: Fri Mar 06, 2009 10:01 am
by shadowslash
hi, here i am once again to ask, how do i retrieve the list of subkeys and values inside a registry key?

e.g.
i wanna know the subkeys and the values of under the registry key HKEY_LOCAL_MACHINE\Software\Microsoft

what code does it best aside from using the one i made up below:

Code: Select all

reg query "HKLM\Software\Microsoft" /s
this could be really slow if my program is to wait for reg.exe to finish first.. so what i wanna do is get the subkeys and values without using the code above... if anyone has an idea, let's hear it.. :)

------------------

also as an addition, i wanna know what's the script to find the handler of a process just in case it is still in use and it can't be deleted...

thanks ^^

Posted: Fri Mar 06, 2009 10:33 am
by SparkOut
Well, querying that key will return thousands of lines. I don't think you'll find any faster way than to use the reg query tool you mentioned - it's what it is for. Anything else would just make similar calls through another layer, with an extra overhead.

Posted: Fri Mar 06, 2009 10:44 am
by shadowslash
um thanks but what about my problem:
also as an addition, i wanna know what's the script to find the handler of a process just in case it is still in use and it can't be deleted...
^^

Posted: Fri Mar 06, 2009 3:57 pm
by SparkOut
I didn't actually notice that part of the question, I thought it was part of your signoff.
In any case I don't know a simple way to return that single element. You can start some third party monitoring utilities from shell commands, for example you might use processmonitor.exe from Microsoft/Sysinternals.
Or ask the question in a Windows Technet forum, it's not really got anything to do with RunRev. Even though this is the "Windows" forum, it is meant for platform-specific questions to do with deployment of Rev, not a lesson on the operating system itself.

Posted: Sat Mar 07, 2009 6:09 pm
by shadowslash
ohhhhhhh i see, thanks for the info... i thought that since runrev is a powerful programming software it should at least have some of the essential system functions :) maybe i'll try posting to quality.runrev.com ...