Program files environmental variables

Eliot Moss moss@cs.umass.edu
Tue Nov 23 15:27:59 GMT 2021


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


More information about the Cygwin mailing list