X-Recipient: archive-cygwin@delorie.com
X-Original-To: cygwin@cygwin.com
Delivered-To: cygwin@cygwin.com
DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org CD6383850404
Authentication-Results: sourceware.org; dmarc=none (p=none dis=none)
 header.from=SystematicSw.ab.ca
Authentication-Results: sourceware.org;
 spf=none smtp.mailfrom=brian.inglis@systematicsw.ab.ca
X-Authority-Analysis: v=2.4 cv=INe8tijG c=1 sm=1 tr=0 ts=5fb695e7
 a=kiZT5GMN3KAWqtYcXc+/4Q==:117 a=kiZT5GMN3KAWqtYcXc+/4Q==:17
 a=IkcTkHD0fZMA:10 a=yMhMjlubAAAA:8 a=YG1ZXRAFREmabIy2PZwA:9 a=QEXdDO2ut3YA:10
To: cygwin@cygwin.com
References: <rp19q9$12ic$1@ciao.gmane.io>
 <bb490d02-ab8e-d394-8d57-d67bc7e857b8@towo.net> <rp1n3r$2ut$1@ciao.gmane.io>
From: Brian Inglis <Brian.Inglis@SystematicSw.ab.ca>
Organization: Systematic Software
Subject: Re: Please add /cygdrive/c/Windows/Sysnative to the default PATH
Message-ID: <10966099-7fb5-e260-6eff-94cfece470d3@SystematicSw.ab.ca>
Date: Thu, 19 Nov 2020 08:57:26 -0700
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101
 Thunderbird/78.4.3
MIME-Version: 1.0
In-Reply-To: <rp1n3r$2ut$1@ciao.gmane.io>
Content-Language: en-CA
X-CMAE-Envelope: MS4xfI3GBsV3rTo9CsvHHFahMHiYLQImYrKXC2t6sfefTh6TnjgxBRVkRvvQfdZTiPji6H6Ns35gAoclS/ExeOgPWsrcXpJ+ZhwHVK8eCzno0g9Qg5X+1Q8P
 GqxExiYWtv+2k1GhGKAgwzPn2E5++143C2vzC1A//yrFT/EEfQ0Jkxvh2Jw2ZIXSLK7a44bCgHUUvvI8d35ypxEXZcPlR04s80U=
X-Spam-Status: No, score=-6.1 required=5.0 tests=BAYES_00, 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@cygwin.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@cygwin.com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-request@cygwin.com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
 <mailto:cygwin-request@cygwin.com?subject=subscribe>
Reply-To: cygwin@cygwin.com
Content-Type: text/plain; charset="utf-8"; Format="flowed"
Errors-To: cygwin-bounces@cygwin.com
Sender: "Cygwin" <cygwin-bounces@cygwin.com>
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 0AJFvtT4028567

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!

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

