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]

Re: System environment variables


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/


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