From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 69459 invoked by alias); 6 Aug 2019 15:41:59 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 69451 invoked by uid 89); 6 Aug 2019 15:41:59 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-104.4 required=5.0 tests=AWL,BAYES_00,GOOD_FROM_CORINNA_CYGWIN,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy=Haubenwallner, haubenwallner, H*F:D*cygwin.com X-HELO: mout.kundenserver.de Received: from mout.kundenserver.de (HELO mout.kundenserver.de) (212.227.126.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 06 Aug 2019 15:41:58 +0000 Received: from calimero.vinschen.de ([24.134.7.25]) by mrelayeu.kundenserver.de (mreue012 [212.227.15.167]) with ESMTPSA (Nemesis) id 1N7gfa-1iQJnt1x4M-014ji1 for ; Tue, 06 Aug 2019 17:41:55 +0200 Received: by calimero.vinschen.de (Postfix, from userid 500) id DF06BA80649; Tue, 6 Aug 2019 17:41:54 +0200 (CEST) Date: Tue, 06 Aug 2019 15:41:00 -0000 From: Corinna Vinschen To: cygwin@cygwin.com Subject: Re: How to query the value of %SystemDrive% in an empty environment? Message-ID: <20190806154154.GR11632@calimero.vinschen.de> Reply-To: cygwin@cygwin.com Mail-Followup-To: cygwin@cygwin.com References: <089bb243-1dbb-048a-39aa-f54048a39e26@ssi-schaefer.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="lIdIj/ncdD+VcXt4" Content-Disposition: inline In-Reply-To: <089bb243-1dbb-048a-39aa-f54048a39e26@ssi-schaefer.com> User-Agent: Mutt/1.11.3 (2019-02-01) X-SW-Source: 2019-08/txt/msg00074.txt.bz2 --lIdIj/ncdD+VcXt4 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-length: 595 On Aug 6 17:20, Michael Haubenwallner wrote: > Hi, >=20 > using 'env -i' to create an empty environment, the SYSTEMROOT and WINDIR > environment variables are preserved (or recreated): > $ /usr/bin/env -i /usr/bin/env > SYSTEMROOT=3DC:\Windows > WINDIR=3DC:\Windows >=20 > And with cygpath, there is the -A, -D, -H, -O, -P, -S, -W and even -F fla= gs > to query the values for various directories. >=20 > Now what I've failed to find is how to query the value for the "SystemDri= ve" > environment variable. Just strip it off SYSTEMROOT? Corinna --=20 Corinna Vinschen Cygwin Maintainer --lIdIj/ncdD+VcXt4 Content-Type: application/pgp-signature; name="signature.asc" Content-length: 833 -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEoVYPmneWZnwT6kwF9TYGna5ET6AFAl1Jn8IACgkQ9TYGna5E T6AJwQ/9EWA5ZU6dY/hHn1Cttr79nC/sA4Pwgw/hPXJtHG5hnnYpTpNw/XCPXzO6 bpxsWwnDkez1XX+pEYZ/oD+0cZRIwlSSuAdP6TJ7VaTUvOToOiqPWlDg4CGR6xfr EtdxmZOPnB502tu0WIsducghW/QwtR73fFYCxsNdAoqKLdF31U9uyctn0e+BZU9z 4W1U5/uHuHHOimSOpJ5sojnGNq8GC7RZyvVxuaIoSLtVnMiEsfVpniIBhJ46ZGkp A6UkWlP1HxoLGd7anf3vKBV+dGxHWEZFxr9S3iKPRiPlohBau33tSI7MJ9NZodFM aKJ4S0o8UKS6mVbOk870NoVsp4BAO5PxDooF5ncs8ivpYaySbQB7QV+Ov9634wDL GmT9m7W3eCn+VnXHDCYF2vc92DwzsGNywA4aw44hO3RNYiZOIRu2k0LlY3Su/0nD nTJOJ2trqVdS7NgCVpDr3ZxpkYfs2GaMtWhHSsYV0eBWWGyxP2G9Bj29GbDK231l WAsyr0npQlPTSvKq9VHKik0+1U97c3hfGJ6+/d1SLqpQ3hcuZz32Jq9aiMx/KOBh fAOkpp/XNC+0HKjOQhkO7YsZ8LCHr6b7j/TeHbqHXWRQC1k06aQvo8MNEO1tLHoc YOOvCKjLQNNO0RIELk6ttBRUI5uNwVq3NaFXTWgxuqZybcK/GuU= =D9at -----END PGP SIGNATURE----- --lIdIj/ncdD+VcXt4--