Registry Query

D

davedom.mis

I am trying to use a batch file to query a registry entry. I am using
reg.exe to accomplish this.

If I do the following it works and shows all the stings for this key:

reg query
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\winzip

I want to query a key that has spaces in it, such as:

reg query
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Remote
Administrator v2.2

When i try this, i get: Error: Invalid command-lin parameters.

I have tried using _ and " in place of the spaces. This has not worked.


Any suggestions?
 
E

Edwin vMierlo

use "" around the full key name

Example
reg query
"HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\RemoteAdministrato
r v2.2"
 
J

Jim Howes

I want to query a key that has spaces in it, such as:

reg query
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Remote
Administrator v2.2

When i try this, i get: Error: Invalid command-lin parameters.

I have tried using _ and " in place of the spaces. This has not worked.

Any suggestions?

reg query "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Remote
Administrator v2.2"

?
 
D

davedom.mis

Jim said:
reg query "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Remote
Administrator v2.2"

?




Thanks for the help. i knew it was something simple, but just couldnt
see it.

Dave
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top