listing subkeys and values

Deploying to Windows? Utilizing VB Script execution? This is the place to ask Windows-specific questions.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
shadowslash
Posts: 344
Joined: Tue Feb 24, 2009 6:14 pm
Contact:

listing subkeys and values

Post by shadowslash » Fri Mar 06, 2009 10:01 am

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 ^^
Parañaque, Philippines
Image
Image

SparkOut
Posts: 2945
Joined: Sun Sep 23, 2007 4:58 pm

Post by SparkOut » Fri Mar 06, 2009 10:33 am

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.

shadowslash
Posts: 344
Joined: Tue Feb 24, 2009 6:14 pm
Contact:

Post by shadowslash » Fri Mar 06, 2009 10:44 am

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...
^^
Parañaque, Philippines
Image
Image

SparkOut
Posts: 2945
Joined: Sun Sep 23, 2007 4:58 pm

Post by SparkOut » Fri Mar 06, 2009 3:57 pm

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.

shadowslash
Posts: 344
Joined: Tue Feb 24, 2009 6:14 pm
Contact:

Post by shadowslash » Sat Mar 07, 2009 6:09 pm

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 ...
Parañaque, Philippines
Image
Image

Post Reply