3

I am new to linux. Please help !!

I am trying to read the windows registry key entry on a remote (windows) system using the below rsh command which has a space in the folder name. Kindly let me know how to resolve this.

rsh <"remote_ip"> REG QUERY HKEY_LOCAL_MACHINE\SOFTWARE\VMware, Inc.
ERROR: Invalid syntax.
Type "REG QUERY /?" for usage.

Thanks, Rajesh

Rajesh
  • 31
  • 1
  • 3
  • The first step is to figure out how the command should be formatted, exactly, in order to permit this, when executed natively from an MS-Windows command line. It's logically impossible to figure out how to execute a command if you don't really know what the command should be. – Sam Varshavchik Oct 30 '14 at 11:01
  • perhaps quoting just the filename is enough : REG QUERY HKEY_LOCAL_MACHINE\SOFTWARE\"VMware, Inc." – lmsteffan Oct 30 '14 at 11:03
  • Imsteffan.. I tried it. Did not work – Rajesh Oct 30 '14 at 11:04
  • 1
    Sam.. Thanks for ur reply. On windows command line, we need to mention the key name in quotes. It works there, but not on a remote machine.. On windows:- PS C:\Users\Administrator> REG QUERY "HKEY_LOCAL_MACHINE\Software\VMware, Inc." HKEY_LOCAL_MACHINE\Software\VMware, Inc.\VMware Drivers – Rajesh Oct 30 '14 at 11:05

1 Answers1

1

When the path contains names with space, use quotes as shown

REG QUERY "HKEY_LOCAL_MACHINE\SOFTWARE\VMware, Inc."

Martin
  • 3,396
  • 5
  • 41
  • 67