delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/11/06/12:07:18

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Message-ID: <47309F0E.1060603@free.fr>
Date: Tue, 06 Nov 2007 18:06:22 +0100
From: cuicui <cuicui DOT oizo AT free DOT fr>
User-Agent: Thunderbird 2.0.0.6 (X11/20070728)
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: reg.exe vs. regtool behaviour
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019