This is the mail archive of the
mailing list for the Cygwin project.
Re: regtool quoting variations on output
- From: Igor Pechtchanski <pechtcha at cs dot nyu dot edu>
- To: luke dot kendall at cisra dot canon dot com dot au
- Cc: cygwin at cygwin dot com
- Date: Tue, 21 Sep 2004 09:17:00 -0400 (EDT)
- Subject: Re: regtool quoting variations on output
- References: <20040921072822.9600784CCD@pessard.research.canon.com.au>
- Reply-to: cygwin at cygwin dot com
On Tue, 21 Sep 2004, luke.kendall wrote:
> A script broke today because regtool reported a key's value with
> extra double quotes around it.
> I also observed that whether or not a path was reported with a trailing
> "\" varied from one machine to the other. Both were using regtool ver
> "stout" is Windows XP, "percy" is Windows 2000.
I would guess that the quotes would be always present on 2000 and never
present on XP -- can that be verified?
> luke@STOUT /cygdrive/x/cygnus/cisra
> $ regtool -q get "\\HKLM\\SOFTWARE\\Microsoft\\Office\\10.0\\Word\\InstallRoot\\Path"
> C:\Program Files\Microsoft Office\Office10\
> mdias@PERCY ~
> $ regtool -q get "\\HKLM\\SOFTWARE\\Microsoft\\Office\\8.0\\Word\\InstallRoot\\Path"
> "C:\Program Files\Microsoft Office\Office"
An aside: if you used single quotes, you wouldn't need to double the
> Visual inspection of the above key in regedit on percy (W2K) showed that
> its value had no double-quotes in the registry. Visual inspection on
> stout (WXP) also showed no double-quotes around the path (though it did
> have the trailing backslash, just as regtool reported).
Do they have the same key type? If not, the above could be the behavior
of ExpandEnvironmentStrings(), and you'll just have to deal with it.
AFAICS, regtool itself does not add double quotes anywhere.
> I can change my script to pipe the output from regtool through
> sed 's/^"//;s/"$//', but that seems like a kludge to me.
If you want the script to be robust, I don't see how this is much of a
> Does anyone have any idea what might be going on here?
|\ _,,,---,,_ email@example.com
ZZZzz /,`.-'`' -. ;-;;,_ firstname.lastname@example.org
|,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski, Ph.D.
'---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow!
"Happiness lies in being privileged to work hard for long hours in doing
whatever you think is worth doing." -- Dr. Jubal Harshaw
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html