Re: Portable Cygwin: Windows Registry Entries?
Jon Turney via Cygwin-apps <[email protected]>
| Newsgroups | gmane.os.cygwin.applications |
|---|---|
| Message-ID | <[email protected]> |
On 31/07/2025 09:36, Thomas Wolff via Cygwin-apps wrote: > Am 30.07.2025 um 20:22 schrieb Jon Turney via Cygwin-apps: >> On 28/07/2025 14:01, Matthew Sheets via Cygwin-apps wrote: >>> I've been poking around at what might be needed to facilitate a >>> portable Cygwin setup, and registry activity is one of the aspects >>> that would need to be addressed. >>> >>> Are there any flags, options, special environment variables, etc. >>> that would prevent Cygwin from making any registry changes? >>> >>> Cygwin FAQ 2.24 states the following: >>> "Cygwin doesn't store anything important in the registry anymore for >>> quite some time. There's no reason to save, restore or delete it." >>> - https://www.cygwin.com/faq.html#faq.setup.registry >>> >>> After a fresh install to a clean system with a recent CygwinSetup- >>> x86_64.exe (June 30), registry entries like the following can be found: >>> [HKEY_CURRENT_USER\SOFTWARE\Cygwin\Installations] >>> "e022582115c10879"="\\??\\C:\\cygwin64" >>> >>> [HKEY_LOCAL_MACHINE\SOFTWARE\Cygwin\Installations] >>> "e022582115c10879"="\\??\\C:\\cygwin64" >> >> These are records of the "installation key", a hash of the path Cygwin >> is installed in (which is, um, added to the names of internal objects >> to so that multiple cygwin installations are isolated from each other, >> or something like that) >> >> This is written to the registry by the DLL, purely for informational >> purposes, I think. >> > [HKEY_LOCAL_MACHINE\SOFTWARE\Cygwin\setup] >>> "rootdir"="C:\\cygwin64" >> This last registry entry is written by setup.This is only used to >> store the selected installation root directory, so that setup can >> default to it, next time you run it. > It may also confuse setup as I reported some months ago. With two > installations (one for testing), setup was permantly switched to > proposing the test root, even after installing for the main working > installation again. > I'd suggest to drop this registry writing (i.e. make --no-write-registry > the default). Setup should check whether it's being called from within a > cygwin installation tree and use that, or fallback to the default. No, I don't think it's a good idea to make the typical use case worse (user has one cygwin installation) in order to perhaps improve the edge case (user has multiple cygwin installations). And if adding this option does make things work the way you want (which seems to be just an assertion at this point, since you're not actually reporting that you tested it and it does), you could always do that?