X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:reply-to :references:mime-version:content-type:in-reply-to; q=dns; s= default; b=EE5lGZG4MGcDjN2zJTEc/72ECQ29voI54X9Q7jD6dZgZpXXrdBRPJ ykYe8NW72xzEFcrQTKryG5a161sZD7FWN6MLZFMUaiB07ZWu5+wd+2F1/gdZNUg7 zWVqOY7rJ+xHniNpF5iSTr2sqeicVHbJkacnfZjEYXibvCFus8GpxY= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:reply-to :references:mime-version:content-type:in-reply-to; s=default; bh=YolzZIWCPmoJRpWClRDHquRtqhY=; b=b2GvCRBiZSV0ycVDARZD1q7f9yE4 mfAD3mwGqTsKFzmuaFlDbm8pfERIatlsIGqu34gjxnI4kasMbAlwdYLEVS8iLjXz MmD98QpAXJmJyb1v8krKCl/sOpK69whyCfxllul9juBylBcPypfAMeFs23NoU2CW DGb9lax1vPXbgWs= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com 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 Date: Tue, 6 Aug 2019 17:41:54 +0200 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: How to query the value of %SystemDrive% in an empty environment? Message-ID: <20190806154154.GR11632@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <089bb243-1dbb-048a-39aa-f54048a39e26 AT ssi-schaefer DOT 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) --lIdIj/ncdD+VcXt4 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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" -----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--