Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: reg.exe won't query subkeys

04 Sep 2015   #1
umphorton

Windows 7 32 and 64 bit
 
 
reg.exe won't query subkeys

-Windows 7 Professional 64bit.
-Command is executed from an elevated command prompt.
-It worked yesterday

If I type reg query HKLM/Software ... I get all the subkeys under Sofware.

If I type reg query HKLM /f Software... I get...
HKEY_LOCAL_MACHINE\SOFTWARE
End of search: 1 match(es) found.

If I type reg query HKLM\software\Policies... I get
HKEY_LOCAL_MACHINE\software\Policies\ActivIdentity
HKEY_LOCAL_MACHINE\software\Policies\Adobe
HKEY_LOCAL_MACHINE\software\Policies\Microsoft
HKEY_LOCAL_MACHINE\software\Policies\Tumbleweed

Now is where I run into problems...

If I type reg query HKLM /f policies... I get
End of search: 0 match(es) found.

No matter what key I try this with I get the same result.

Oh and reg delete will successfully delete a key in the place as the two mentioned above.

Any ideas?


My System SpecsSystem Spec
.
04 Sep 2015   #2
umphorton

Windows 7 32 and 64 bit
 
 

reg query hklm /f Software does work and I get this...
HKEY_LOCAL_MACHINE\SOFTWARE
End of search: 1 match(es) found.

It seems like it is having problems with each hive at the 2nd subkey level and below. e.g. HKEY_LOCAL_MACHINE\SOFTWARE\Policies.
My System SpecsSystem Spec
04 Sep 2015   #3
umphorton

Windows 7 32 and 64 bit
 
 

I can also do this...
reg query "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\LowRegistry\DOMStorage\shop.nuan
ce.com"
HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\LowRegistry\DOMStorage\shop.nuance.com
(Default) REG_DWORD 0x0

but not reg query HKCU /f "shop.nuance.com" or reg query HKCU /f shop.nuance.com
My System SpecsSystem Spec
.

05 Sep 2015   #4
Ztruker

Windows 10 Pro X64
 
 

Not sure what this is supposed to do: reg query hklm /f Software

What is the /f for? The query should be reg query hklm\Software and on my system returns:

C:\WINDOWS\system32>reg query HKLM\software

HKEY_LOCAL_MACHINE\software\7-Zip
HKEY_LOCAL_MACHINE\software\AGEIA Technologies
HKEY_LOCAL_MACHINE\software\ATI Technologies
HKEY_LOCAL_MACHINE\software\BillP Studios
HKEY_LOCAL_MACHINE\software\Brother
HKEY_LOCAL_MACHINE\software\Classes
HKEY_LOCAL_MACHINE\software\Clients
HKEY_LOCAL_MACHINE\software\Code Sector
HKEY_LOCAL_MACHINE\software\CyberLink
HKEY_LOCAL_MACHINE\software\Dell
HKEY_LOCAL_MACHINE\software\Dolby
HKEY_LOCAL_MACHINE\software\DTS
HKEY_LOCAL_MACHINE\software\Foxit Software
... ... ... ... ...
My System SpecsSystem Spec
05 Sep 2015   #5
UsernameIssues

W7 Pro SP1 64bit
 
 

Quote   Quote: Originally Posted by Ztruker View Post
Not sure what this is supposed to do: reg query hklm /f Software

What is the /f for?
It seems to allow for a search term.

Code:
c:\>reg query /?

REG QUERY KeyName [/v [ValueName] | /ve] [/s]
          [/f Data [/k] [/d] [/c] [/e]] [/t Type] [/z] [/se Separator]

  KeyName  [\\Machine\]FullKey
           Machine - Name of remote machine, omitting defaults to the
                     current machine. Only HKLM and HKU are available on
                     remote machines
           FullKey - in the form of ROOTKEY\SubKey name
                ROOTKEY - [ HKLM | HKCU | HKCR | HKU | HKCC ]
                SubKey  - The full name of a registry key under the
                          selected ROOTKEY

  /v       Queries for a specific registry key values.
           If omitted, all values for the key are queried.

           Argument to this switch can be optional only when specified
           along with /f switch. This specifies to search in valuenames only.

  /ve      Queries for the default value or empty value name (Default).

  /s       Queries all subkeys and values recursively (like dir /s).

  /se      Specifies the separator (length of 1 character only) in
           data string for REG_MULTI_SZ. Defaults to "\0" as the separator.

  /f       Specifies the data or pattern to search for.
           Use double quotes if a string contains spaces. Default is "*".

  /k       Specifies to search in key names only.

  /d       Specifies the search in data only.

  /c       Specifies that the search is case sensitive.
           The default search is case insensitive.

  /e       Specifies to return only exact matches.
           By default all the matches are returned.

  /t       Specifies registry value data type.
           Valid types are:
             REG_SZ, REG_MULTI_SZ, REG_EXPAND_SZ,
             REG_DWORD, REG_QWORD, REG_BINARY, REG_NONE
           Defaults to all types.

  /z       Verbose: Shows the numeric equivalent for the type of the valuename.

Examples:

  REG QUERY HKLM\Software\Microsoft\ResKit /v Version
    Displays the value of the registry value Version

  REG QUERY \\ABC\HKLM\Software\Microsoft\ResKit\Nt\Setup /s
    Displays all subkeys and values under the registry key Setup
    on remote machine ABC

  REG QUERY HKLM\Software\Microsoft\ResKit\Nt\Setup /se #
    Displays all the subkeys and values with "#" as the seperator
    for all valuenames whose type is REG_MULTI_SZ.

  REG QUERY HKLM /f SYSTEM /t REG_SZ /c /e
    Displays Key, Value and Data with case sensitive and exact
    occurrences of "SYSTEM" under HKLM root for the data type REG_SZ

  REG QUERY HKCU /f 0F /d /t REG_BINARY
    Displays Key, Value and Data for the occurrences of "0F" in data
    under HKCU root for the data type REG_BINARY

  REG QUERY HKLM\SOFTWARE /ve
    Displays Value and Data for the empty value (Default)
    under HKLM\SOFTWARE
My System SpecsSystem Spec
06 Sep 2015   #6
GokAy

Windows 7 Ultimate x64 SP1
 
 

According to Technet; "This parameter only returns entries that are in the tier directly below the specified subkey. Entries that are located in subkeys under the current subkey will not be found. When EntryName is omitted, all entries under the subkey are returned. "

You can try experimenting with the /s switch, I am getting mixed results. See for yourself

Code:
C:\Users\User>reg query hklm\software\policies /s /f windows
HKEY_LOCAL_MACHINE\software\policies\Microsoft\SQMClient\Windows
HKEY_LOCAL_MACHINE\software\policies\Microsoft\Windows
HKEY_LOCAL_MACHINE\software\policies\Microsoft\Windows NT
HKEY_LOCAL_MACHINE\software\policies\Microsoft\Windows NT\Windows File Protection
Arama sonu: 4 eşleşme bulundu. (found 4)
 
With /e switch added
C:\Users\User>reg query hklm\software\policies /s /f windows /e
HKEY_LOCAL_MACHINE\software\policies\Microsoft\SQMClient\Windows
HKEY_LOCAL_MACHINE\software\policies\Microsoft\Windows
Arama sonu: 2 eşleşme bulundu. (found 2)
My System SpecsSystem Spec
06 Sep 2015   #7
Pyprohly

Windows 10, Windows 8.1 Pro, Windows 7 Professional, OS X El Capitan
 
 

I too, think that the OP wants to search an entire hive for a specific key name. The Reg Query for that would be like,
Code:
reg query HKXX /f KeyNameToFind /s /k /e

Quote   Quote: Originally Posted by GokAy View Post
You can try experimenting with the /s switch, I am getting mixed results.
What is so mixed result-y?
My System SpecsSystem Spec
06 Sep 2015   #8
GokAy

Windows 7 Ultimate x64 SP1
 
 

Sorry it was a vague argument

I couldn't manage to find the exact search commands for what I wanted to search (while testing).
My System SpecsSystem Spec
Reply

 reg.exe won't query subkeys




Thread Tools Search this Thread
Search this Thread:

Advanced Search




Similar help and support threads
Thread Forum
A RAM query
This is going to sound real dumb but I bought what I thought was 2GB of DDR form a US site for $20 now I should have read the ad a bit more carefully but whats done is done. What I would like to know though is why does high density RAM not work the same as low density I always thought RAM was...
Hardware & Devices
Query re WLM
Have had to reinstall my entire machine - hard drive failure. Have got it all set up with most of the stuff I had before except the WLM. Have downloaded Live Essentials signed in etc etc - is there a tutorial on how to set it up - Ive had a quick look but cannot find what I want. The...
Browsers & Mail
Query re HDD's
I have had a quick look but cannot find much but..... I have built a SB with i5 2500 on Gigabyte GA-H67A-UD3H-B3 Motherboard and I fitted a Samsung SpinPoint F3 1TB HD103SJ but find it a bit noisy so have bought a Seagate Barracuda 1TB ST31000524AS not only because it is supposed to be...
Hardware & Devices
Query
Hiyya everyone - I got this request from a friend who I personally think is wasting his dough and although I can help him a bit (had no idea of costs as you will see) the only thing I cannot help is with the driver/s he wants. I did suggest he come on here but anyway his message - You might...
Drivers
VPN Query
Hi folks, Can anyone tell me if it's possible for multiple users to edit & save an excel spreadsheets over a VPN conection. I have enabled sharing of the sheet but the data does not merge, the ammendments remain unique to the individual users machines. Any advice greatly appreciated.
Network & Sharing
Query
:D hi every body, I Have windows 7 ultimate running on 1.5 gb ram,320 gb(4 partitions) westerndigitals HDD(on INTEL D915GAV motherboard). Its been a month i installed win7 ultimate.I hadnt installed anything on C: drive which is of 60gb capacity.But the free space is decreasing day after...
General Discussion


Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 11:50.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App