public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Brian Inglis <Brian.Inglis@SystematicSw.ab.ca>
To: cygwin@cygwin.com
Subject: Re: Please add /cygdrive/c/Windows/Sysnative to the default PATH
Date: Tue, 24 Nov 2020 14:06:02 -0700	[thread overview]
Message-ID: <c4ad7132-e5d7-92ea-33b7-641412083b4e@SystematicSw.ab.ca> (raw)
In-Reply-To: <f1278b11-76cb-b987-5614-41e3451f59b3@towo.net>

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



  parent reply	other threads:[~2020-11-24 21:06 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-17 19:54 tealhill
2020-11-17 21:23 ` Thomas Wolff
2020-11-17 23:41   ` tealhill
2020-11-18 15:21     ` Bill Stewart
2020-11-18 15:45     ` Achim Gratz
2020-11-19  9:15     ` Andrey Repin
2020-11-19 15:57     ` Brian Inglis
2020-11-24  7:24       ` Thomas Wolff
2020-11-24 14:52         ` Bill Stewart
2020-11-24 15:10           ` Hamish McIntyre-Bhatty
2020-11-24 21:06         ` Brian Inglis [this message]
2020-11-24  1:58     ` L A Walsh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c4ad7132-e5d7-92ea-33b7-641412083b4e@SystematicSw.ab.ca \
    --to=brian.inglis@systematicsw.ab.ca \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).