X-Recipient: archive-cygwin AT delorie DOT com X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 4B0B83858D28 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=cs.umass.edu Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=cs.umass.edu Subject: Re: Program files environmental variables To: john doe <johndoe65534 AT mail DOT com>, cygwin AT cygwin DOT com References: <693ff161-60af-7e60-7325-ce0f2b42acc0 AT mail DOT com> <46d3d516-fac6-ca09-0166-398670c28cd6 AT cs DOT umass DOT edu> <f7319af9-302b-fbee-76ee-fc83cc8983b9 AT mail DOT com> From: Eliot Moss <moss AT cs DOT umass DOT edu> Message-ID: <d902fe78-1bde-02a8-f94f-87defbc3a0ff@cs.umass.edu> Date: Tue, 23 Nov 2021 10:27:59 -0500 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Thunderbird/68.12.1 MIME-Version: 1.0 In-Reply-To: <f7319af9-302b-fbee-76ee-fc83cc8983b9@mail.com> Content-Language: en-US X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, NICE_REPLY_A, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: cygwin AT cygwin DOT com X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com> List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>, <mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe> List-Archive: <https://cygwin.com/pipermail/cygwin/> List-Post: <mailto:cygwin AT cygwin DOT com> List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help> List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>, <mailto:cygwin-request AT cygwin DOT com?subject=subscribe> Reply-To: moss AT cs DOT umass DOT edu Content-Type: text/plain; charset="utf-8"; Format="flowed" Errors-To: cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com> Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 1ANFSaXK020894 On 11/23/2021 10:15 AM, john doe via Cygwin wrote: > On 11/23/2021 2:10 PM, Eliot Moss wrote: >> On 11/23/2021 4:02 AM, john doe via Cygwin wrote: >> > Cygwins, >> > >> > Is there a way to get the value of PROGRAMFILES(x86) and PROGRAMW6432 in >> > Bash: >> > >> > $ echo $PROGRAMFILES; echo "$PROGRAMFILES(x86)"; echo $PROGGRAMW6432 >> > C:\Program Files >> > C:\Program Files(x86) >> > >> > $ cmd.exe /C "echo %PROGRAMFILES% %PROGRAMFILES(x86)% %PROGRAMW6432%" >> > C:\Program Files C:\Program Files (x86) C:\Program Files >> > >> > >> > PROGRAMFILES works in Bash but not the other two. >> >> PROGRAMW6432 exists in my Cygwin bash, and I know I did not set it > > What version of Cygwin bash are you using? 4.4.12(3) Yes, printenv is a much more elegant solution than mine! Cheers - EM -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple