From ab3c94ebf0e78606c3660bec8e0c04c6e6b8ddd4 Mon Sep 17 00:00:00 2001 From: Christian Franke Date: Sat, 9 Jul 2022 16:52:47 +0200 Subject: [PATCH 1/2] Add new option --no-write-registry If specified, the rootdir is not written to the registry and no registry key is created. --- install.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/install.cc b/install.cc index 1fdc699..eb7b1b2 100644 --- a/install.cc +++ b/install.cc @@ -70,6 +70,7 @@ static long long int total_bytes_sofar = 0; static int package_bytes = 0; static BoolOption NoReplaceOnReboot (false, 'r', "no-replaceonreboot", IDS_HELPTEXT_NO_REPLACEONREBOOT); +static BoolOption NoWriteRegistry (false, '\0', "no-write-registry" /*, TODO: IDS_HELPTEXT_... */); struct std_dirs_t { const char *name; @@ -833,8 +834,9 @@ do_install_thread (HINSTANCE h, HWND owner) int df = diskfull (get_root_dir ().c_str()); Progress.SetBar3 (df); - /* Writes Cygwin/setup/rootdir registry value */ - create_install_root (); + if (!NoWriteRegistry) + /* Writes Cygwin/setup/rootdir registry value */ + create_install_root (); std::vector install_q, uninstall_q, sourceinstall_q; -- 2.36.1