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" [HKEY_LOCAL_MACHINE\SOFTWARE\Cygwin\setup] "rootdir"="C:\\cygwin64" This seems to be somewhat alluded to under FAQ 2.20.7, which covers Cygwin uninstall: "Finally, if you want to be thorough you can delete the registry tree Software\Cygwin under HKEY_LOCAL_MACHINE and/or HKEY_CURRENT_USER. However, if you followed the directions above you will have already removed everything important. Typically only the installation directory has been stored in the registry at all." - https://www.cygwin.com/faq.html#faq.setup.uninstall-all My initial thought was that these registry changes perhaps might be made by the Setup executable, but in a search of the Setup source code, nothing jumped out at me, but there were a few potential users of reg_key::set_string() within the searchable repos on GitHub. * https://cygwin.com/cgit/cygwin-apps/setup/tree/ * https://github.com/search?q=repo%3Acygwin%2Fcygwin+set_string&type=code Thank you, Matthew
