RE: REG QUERY 05-18-2013, 09:37 AM
#7
You're not looking for the Registry location, you're looking for "Broad", that's why I initially had "HKEY" in there, because a registry location would have this in there... I don't get what you want to do, my script does get the registry path... :huh:
Look at the command prompt I have open in the image I provided lol. Those are all the keys that contain a (sub)key called "Debug."
edit: Ahh, I think I know what you mean now:
For example, if the value "0x0" in this case was "Broad"(?), for any of the paths returned, you want to get the path itself (the line above each key that has a value "Broad")?
Loop through the output then, keep a record of the previous value and the current as you go through the loop, validate that you're looking at the path as your first value by checking the substring for "HKEY", then if the second variable contains what you are looking for, store that first value.
Make a pseudo array (batch doesn't have real arrays)
So:
And then loop from whatever you assigned a path# variable with, using the initial value that was given to incrementVar until you find something which is not defined.
You should logically end up with %path1%, %path2%, etc.... So these are the variables you are looping through to use the paths.
Make sense?
Look at the command prompt I have open in the image I provided lol. Those are all the keys that contain a (sub)key called "Debug."
edit: Ahh, I think I know what you mean now:
Code:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Outlook\Performance
Debug REG_DWORD 0x0For example, if the value "0x0" in this case was "Broad"(?), for any of the paths returned, you want to get the path itself (the line above each key that has a value "Broad")?
Loop through the output then, keep a record of the previous value and the current as you go through the loop, validate that you're looking at the path as your first value by checking the substring for "HKEY", then if the second variable contains what you are looking for, store that first value.
Make a pseudo array (batch doesn't have real arrays)
So:
Code:
set path%incrementVar%={The path}
{increment %incrementVar%'s value by 1}And then loop from whatever you assigned a path# variable with, using the initial value that was given to incrementVar until you find something which is not defined.
You should logically end up with %path1%, %path2%, etc.... So these are the variables you are looping through to use the paths.
Make sense?
ArkPhaze
"Object oriented way to get rich? Inheritance"
Getting Started: C/C++ | Common Mistakes
[ Assembly / C++ / .NET / Haskell / J Programmer ]
"Object oriented way to get rich? Inheritance"
Getting Started: C/C++ | Common Mistakes
[ Assembly / C++ / .NET / Haskell / J Programmer ]


![[+]](https://sinister.li/images/modern/collapse_collapsed.png)