title: Processing reg query output as a single line
body: <p>I want to get some details from the Windows registry in a single line (one per key) format. But what I have tried so far gives me the details I want, but split over 2/3 lines, which makes post processing harder.</p>
  
  <p>This is on Windows 10.</p>
  
  <p>One option is to query the registry, so I run the following:</p>
  
  <p><code>reg query hklm\system\currentcontrolset\enum /s  /f "DeviceDesc"</code></p>
  
  <p>This gives me output in the following format (snippet):</p>
  
  <pre><code>HKEY_LOCAL_MACHINE\system\currentcontrolset\enum\HID\VID_1A2C&amp;PID_2124&amp;MI_01&amp;Col02\7&amp;2a45f711&amp;0&amp;0001
      DeviceDesc    REG_SZ    @input.inf,%hid_device_system_control%;HID-compliant system controller
  
  HKEY_LOCAL_MACHINE\system\currentcontrolset\enum\HID\VID_1A2C&amp;PID_2124&amp;MI_01&amp;Col02\8&amp;9a82e8&amp;0&amp;0001
      DeviceDesc    REG_SZ    @input.inf,%hid_device_system_control%;HID-compliant system controller
  
  HKEY_LOCAL_MACHINE\system\currentcontrolset\enum\HID\VID_2149&amp;PID_2117&amp;MI_00\7&amp;1e3fba77&amp;0&amp;0000
      DeviceDesc    REG_SZ    @input.inf,%hid_device_touch_screen%;HID-compliant touch screen
  
  HKEY_LOCAL_MACHINE\system\currentcontrolset\enum\HID\VID_2149&amp;PID_2117&amp;MI_01\7&amp;316fd6b5&amp;0&amp;0000
      DeviceDesc    REG_SZ    @input.inf,%hid_device_vendor_defined_range%;HID-compliant vendor-defined device
  
  HKEY_LOCAL_MACHINE\system\currentcontrolset\enum\HID\VID_24AE&amp;PID_2003&amp;MI_00\8&amp;456ad84&amp;0&amp;0000
      DeviceDesc    REG_SZ    @keyboard.inf,%hid.keyboarddevice%;HID Keyboard Device
  </code></pre>
  
  <p>The format is:</p>
  
  <pre><code>BLANK LINE
  HKEY_LOCAL.....
      DeviceDesc .....
  </code></pre>
  
  <p>What I want is the <code>HKEY_LOCAL...</code> and <code>DeviceDesc</code> to appear on the same line of output text, so that I can use <code>FIND/FINDSTR</code> to get the complete info for the device I am interested in.</p>
  
  <p>With the output as it stands, I cannot get the two piece of information together using DOS commands.</p>
  
  <p>Is there a way to make DeviceDesc appear of the same line ?</p>
  
  <p>I could write a Java/C# for this, but it seems overkill.</p>