delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/08/25/10:42:48

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
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
Date: Thu, 25 Aug 2005 10:42:35 -0400 (EDT)
From: Jason Pyeron <jpyeron AT pdinc DOT us>
X-X-Sender: jpyeron AT ns DOT pyerotechnics DOT com
To: cygwin AT cygwin DOT com
Subject: Re: System environment variables
In-Reply-To: <20050825100801.GM17452@calimero.vinschen.de>
Message-ID: <Pine.LNX.4.62.0508251034060.4176@ns.pyerotechnics.com>
References: <Pine DOT LNX DOT 4 DOT 62 DOT 0508241300580 DOT 26825 AT ns DOT pyerotechnics DOT com> <20050824174417 DOT GG17452 AT calimero DOT vinschen DOT de> <Pine DOT LNX DOT 4 DOT 62 DOT 0508241420530 DOT 26825 AT ns DOT pyerotechnics DOT com> <20050825100801 DOT GM17452 AT calimero DOT vinschen DOT de>
MIME-Version: 1.0
X-IsSubscribed: yes

On Thu, 25 Aug 2005, Corinna Vinschen wrote:

> Basically a good idea, but it probably won't work for two reasons.
>
> - Some of the env variables in the registry are REG_EXPAND_SZ strings which
>  contain other variables like this:
>
>     %SystemRoot%\System32

ignoring it for now, those are not needed as much as ANT_HOME, JAVA_HOME, 
... and other vars setup by MSI scripts (often).

>
>  These strings have to be expanded before they are usable as real env
>  strings.
>
> - The output of cat isn't quoted, so you will probably get wrong results
>  when backslashes are used like above.

hmmm. Backslashes have been coming out fine, could the back-tic be doing 
something for me here?


The script has been working like a charm.

The outstanding issues:

1) efficient way to pass an excluded list of vars.
   ie exclude Path, Windir since Windir is WINDIR, etc

2) better way to test for 'foovar=' vs no var 'foovar'

3) detection of REG_EXPAND_SZ, and interpolation.

-- 
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-                                                               -
- Jason Pyeron                      PD Inc. http://www.pdinc.us -
- Partner & Sr. Manager             7 West 24th Street #100     -
- +1 (443) 921-0381                 Baltimore, Maryland 21218   -
-                                                               -
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

This message is for the designated recipient only and may contain 
privileged, proprietary, or otherwise private information. If you 
have received it in error, purge the message from your system and 
notify the sender immediately.  Any other use of the email by you 
is prohibited.

--
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