delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/11/30/23:18:16

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,SPF_PASS
X-Spam-Check-By: sourceware.org
Message-ID: <4B149CB7.5020104@gmail.com>
Date: Tue, 01 Dec 2009 04:33:59 +0000
From: Dave Korn <dave DOT korn DOT cygwin AT googlemail DOT com>
User-Agent: Thunderbird 2.0.0.17 (Windows/20080914)
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: how to get the windows PATH env in cygwin
References: <8d7f7110911300444l7ab3c2c8l5ac1edf0097d2065 AT mail DOT gmail DOT com> <4B142061 DOT 6000200 AT cygwin DOT com> <8d7f7110911301717jbafbc2ci432817b1c713f1e6 AT mail DOT gmail DOT com> <20091201013022 DOT GA2336 AT KCJs-Computer> <4B147423 DOT 1050404 AT bopp DOT net> <hf1tlj$60o$2 AT ger DOT gmane DOT org> <4B1487F1 DOT 5080302 AT gmail DOT com> <hf23tc$i47$1 AT ger DOT gmane DOT org>
In-Reply-To: <hf23tc$i47$1@ger.gmane.org>
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

Andrew DeFaria wrote:
> The real question here is what does he need the Windows PATH for?

  Agreed, it depends what purposes OP wants it for and whether it absolutely
positively has to be the exact windows path(*) or not. For complete accuracy
from within a cygwin environment you'd probably have to could go the whole hog
and use regtool to read both the user and system environment variables from
wherever-it-is-they-live in the registry(**) and then REG_EXPAND_SZ expand and
combine them yourself.  (Could equally use perl, python, or other similar
scripting language that's registry-aware on windows.)


    cheers,
      DaveK

-- 
(*) - and even what your definition of the "exact" windows path is.
(**) - HKLM\System\CurrentControlSet\Control\Session Manager\Environment
and    HKCU\Environment

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

- Raw text -


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