This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

reg.exe vs. regtool behaviour


Hi,

I have a quick question about queries on the registry, "reg.exe" and regtool don't return the same format for the same value (respectively hexadecimal and decimal):

reg query "HKLM\SOFTWARE\Intel\LANDesk\VirusProtect6\CurrentVersion" /v "ProductVersion"

Returns: "ProductVersion REG_DWORD 0x177a03f8"

And

regtool.exe -q get "/HKLM/SOFTWARE/Intel/LANDesk/VirusProtect6/CurrentVersion/ProductVersion"

Returns: "393872376"

I'm interested in the hex value because it is useful to get the version of Symantec Antivirus: 0x177a (1016 => v10.1.6), 0x03f8 (patch 6010).

I found a workaround with "bc" to obtain the hexadecimal value directly:

regtool -q get "/HKLM/.../ProductVersion" | sed -e "s/^/obase=16;/" | bc

But I'm wondering what's the rule here? Is regtool always returning decimal values for REG_DWORD type? Is it possible to have the hex value with regtool directly?

All the best,

Nicolas

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]