delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2020/11/24/02:25:56

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 BA9A83858009
Authentication-Results: sourceware.org;
dmarc=none (p=none dis=none) header.from=towo.net
Authentication-Results: sourceware.org; spf=none smtp.mailfrom=towo AT towo DOT net
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>
From: Thomas Wolff <towo AT towo DOT net>
Message-ID: <f1278b11-76cb-b987-5614-41e3451f59b3@towo.net>
Date: Tue, 24 Nov 2020 08:24:47 +0100
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: <10966099-7fb5-e260-6eff-94cfece470d3@SystematicSw.ab.ca>
X-Provags-ID: V03:K1:qE62pFoXcBw+4jlvMm0bmcbjxptm9D1TvppaRcPlmvMHcKUHu8s
hROsLASRtRo/b/oFGsxLdtctYRrzP3aMp1EWU3dZuyvN4iUIPns2J68jZEyco3zEBOGeZsj
InkkNBDOk33Z7YyqcSEl8cctFOTfLFrlPk80yCl4BISslLDfRxfgUolyBA4Xpc1dKZgN6rH
y595gHZX8npbeI4V//9jQ==
X-UI-Out-Filterresults: notjunk:1;V03:K0:m6udCcLOp7U=:twdDNjMhyh82OoHvGMY7i4
Q3DfDRAAZl6fpLqF7QhCQWZAjeXBMJKD8rkQ5XZVPoG+E/rTjksfxtomCFn7kHbFP5Yya9y+k
UywOXiuEdWOL67OaU4sCItYMpjbLrgdORBg3OefNbPwo/S3CreiOfum2WbRLchhA9hLzOrHhw
9J4UdOA1Csyxz03yND/Pz2Exyl9OmLK0Ir4n+5aQSp0UGcwoIjY9fpSSIRAgT79vrctLO81ht
bFicU5hN4sB424WiSjf05ax1Dpwq2eotB8Id+YY9QNdT0UXxuCBzgNFJEMd38Z/ua1IQbUM33
JOCr95RdxtL0KSLweg6G1hMLBmgZOw33gKN4f55cQ+plJIp+e134NstKhoGsgc79P9YoLCIne
aUvDHWJiKGM3w/8Z/jN9T0a+Z03iJ4a2uLYMeTd00BN3WpQsgXZNpITTxYSHaNAs5D0iFfxvZ
2H8q4uzUZQ==
X-Spam-Status: No, score=4.7 required=5.0 tests=BAYES_00, BODY_8BITS,
KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, NICE_REPLY_A, RCVD_IN_ABUSEAT,
RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, RCVD_IN_SBL_CSS, SPF_HELO_NONE,
SPF_NONE, TXREP autolearn=no autolearn_force=no version=3.4.2
X-Spam-Level: ****
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>
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 0AO7PbTq032465

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