From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.135]) by sourceware.org (Postfix) with ESMTPS id BA9A83858009 for ; Tue, 24 Nov 2020 07:24:50 +0000 (GMT) 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@towo.net Received: from [192.168.178.45] ([95.90.245.244]) by mrelayeu.kundenserver.de (mreue009 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MfHIZ-1k2LSF3qix-00gp7J for ; Tue, 24 Nov 2020 08:24:48 +0100 Subject: Re: Please add /cygdrive/c/Windows/Sysnative to the default PATH To: cygwin@cygwin.com References: <10966099-7fb5-e260-6eff-94cfece470d3@SystematicSw.ab.ca> From: Thomas Wolff Message-ID: 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> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit 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@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Nov 2020 07:25:10 -0000 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.