delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2020/11/24/16:06:49

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.3.2 sourceware.org D213C395188A
Authentication-Results: sourceware.org; dmarc=none (p=none dis=none)
header.from=SystematicSw.ab.ca
Authentication-Results: sourceware.org;
spf=none smtp.mailfrom=brian DOT inglis AT systematicsw DOT ab DOT ca
X-Authority-Analysis: v=2.4 cv=Q4RsX66a c=1 sm=1 tr=0 ts=5fbd75bb
a=kiZT5GMN3KAWqtYcXc+/4Q==:117 a=kiZT5GMN3KAWqtYcXc+/4Q==:17
a=IkcTkHD0fZMA:10 a=yMhMjlubAAAA:8 a=uYT-Tk0qkVT609LjNaIA:9 a=QEXdDO2ut3YA:10
From: Brian Inglis <Brian DOT Inglis AT SystematicSw DOT ab DOT ca>
Subject: Re: Please add /cygdrive/c/Windows/Sysnative to the default PATH
To: cygwin AT cygwin DOT com
References: <rp19q9$12ic$1 AT ciao DOT gmane DOT io>
<bb490d02-ab8e-d394-8d57-d67bc7e857b8 AT towo DOT net> <rp1n3r$2ut$1 AT ciao DOT gmane DOT io>
<10966099-7fb5-e260-6eff-94cfece470d3 AT SystematicSw DOT ab DOT ca>
<f1278b11-76cb-b987-5614-41e3451f59b3 AT towo DOT net>
Organization: Systematic Software
Message-ID: <c4ad7132-e5d7-92ea-33b7-641412083b4e@SystematicSw.ab.ca>
Date: Tue, 24 Nov 2020 14:06:02 -0700
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101
Thunderbird/78.5.0
MIME-Version: 1.0
In-Reply-To: <f1278b11-76cb-b987-5614-41e3451f59b3@towo.net>
X-CMAE-Envelope: MS4xfNdxwQ31CnnVnJE+W+14XsNWZ4K3BrZWm8djNNwhcAundM2smUMTayUjSmISnCW1f7ofG7QCToixK3fDFY6o95+b0fWI5nL0cYEgEj6JcqynSt6WBEkL
ZDl0rLRJp1aWU5urWcpAb7YYcnDX6H/eLUgTMMbvhQqtkncMrYX7fFKRe9Ww0CuQFP52w3nAHgDoKUJO5i6duC7d53VJhdAMDcs=
X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00, BODY_8BITS,
KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, NICE_REPLY_A, RCVD_IN_DNSWL_LOW,
RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE,
TXREP autolearn=no autolearn_force=no version=3.4.2
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on
server2.sourceware.org
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.29
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: cygwin AT cygwin DOT com
Errors-To: cygwin-bounces AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces AT cygwin DOT com>
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 0AOL6ULi000707

On 2020-11-24 00:24, Thomas Wolff wrote:
> Am 19.11.2020 um 16:57 schrieb Brian Inglis:
>> On 2020-11-17 16:41, tealhill via Cygwin wrote:
>>> On 2020-11-17 4:23 PM, Thomas Wolff wrote:
>>>> Am 17.11.2020 um 20:54 schrieb tealhill via Cygwin:
>>>  >>
>>>>> Cygwin's /etc/profile sets the PATH.
>>>>>
>>>>> Could /etc/profile please also add /cygdrive/c/Windows/Sysnative to the end 
>>>>> of the PATH?
>>>  >
>>>> It doesn't add any other Windows folders so why this one.
>>>
>>> ### Summary
>>>
>>> Why should Cygwin add Sysnative to $PATH?  As a workaround for Microsoft's 
>>> failure to add Sysnative to %PATH%.
>>
>> You have the option to add SysNative to your system or user PATH under 
>> Windows, although that would best be done in your login script.
>>
>>> ### Full explanation
>>>
>>> Cygwin imports the Windows %PATH% variable at startup.
>>>
>>> It would be ideal if Microsoft would add Sysnative to the default Windows 
>>> %PATH%.  Such a change would help Cygwin users and others. But I doubt that 
>>> Microsoft will make this change.
>>>
>>> Therefore, I am suggesting that Cygwin work around Microsoft's omission.  My 
>>> suggested workaround is for Cygwin to add Sysnative to its own $PATH, 
>>> automatically.
>>
>> Cygwin starts with Cygwin paths /usr/bin:/bin and everything else is up to you.
>> You may add to your Cygwin PATH in your shell profile with code that switches 
>> depending on the existence of SysWOW64 and SysNative: cygpath -F 37 gives your 
>> application sysdir path, and cygpath -F 41 gives your x86 sysdir if there is one:
>>
>>     https://docs.microsoft.com/en-ca/dotnet/api/system.environment.specialfolder?view=net-5.0 
>>
>>     https://docs.microsoft.com/en-ca/windows/win32/api/shlobj_core/nf-shlobj_core-shgetknownfolderidlist 
>>
>>     https://docs.microsoft.com/en-ca/windows/win32/shell/knownfolderid
>>
>> and please note that SysNative appears nowhere!
> 
> That's because Sysnative is not a known folder. It is rather unknown just 
> because it is virtual :)
> And that is the problem I tried to address. In cygwin32, you can `cd 
> $WINDIR/Sysnative` but you wouldn't see the folder. For tools like ls or find it 
> simply does not exist, while obviously it exists somehow and can be used in PATH.

It is visible to find and ls when explicitly specified as

	/proc/cygdrive/c/Windows/SysNative/

so the contents can be listed and searched, but you have to know to do so, as it 
does not appear to be derivable from Windows information like other folders.

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.
[Data in binary units and prefixes, physical quantities in SI.]


--
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

- Raw text -


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