2 Replies Latest reply on Feb 8, 2015 4:39 PM by Bo Vial

    Strange formatting of a windows binary registry value when read from nsh script

    Bo Vial

      I have the following command to extract the value of binary Windows registry key:

       

      SQL_DigitalProductID2008=`blquery -h $Server -e 'reg_value("HKEY_LOCAL_MACHINE\\\\SOFTWARE\\\\Microsoft\\\\Microsoft SQL Server\\\\100\\\\Tools\\\\Setup\\\\DigitalProductID")'`

       

      echo $SQL_DigitalProductID2008

       

      The string returned appears to contain a whole bunch of padding characters or something (the f's)

       

      ffffffb40000000300000030323435322d3131392b303030303030372b3035303337000a0000003232b82d303b31373500000000000000ffffff80ffffffb72fffffff8e07ffffffa76bffffff97ffffff864dffffff82ffffffd3fffffff60902000000000057fffffffbffffffcd4f57ffffffe80b00000000000000000000000000000000000000000000000000323232303000000000000000ffffffdc0d0000ffffffd8ffffff9b2e1c002000000000000000000000000000000000000000000000000000000000000000000000ffffff8300ffffffd169

       

      I can see my hexadecimal values in there mixed with this padding.

       

      Is there a way I can just retrieve the hex values without the padding?

       

      When I view the key value in Windows registry directly, I don't see these padding characters.

       

      Thanks