From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-x329.google.com (mail-wm1-x329.google.com [IPv6:2a00:1450:4864:20::329]) by sourceware.org (Postfix) with ESMTPS id 62FDC385DC1C for ; Wed, 15 Apr 2020 10:53:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 62FDC385DC1C Received: by mail-wm1-x329.google.com with SMTP id a81so18405533wmf.5 for ; Wed, 15 Apr 2020 03:53:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=juxSaCJkDln9KevVoIx2EJCywq12gF7y4Zl/elPAxCI=; b=MV7QIBbxwu0klmxj5S630lwjruw6fqn/5uBbj1J63954GY+CVuZDHAiZMGgbjKCWK/ Fs3Y9ggWk2bBWxEoVTHygmK5K8EYvkPT4ALfB8dzCod2247T7jVxCc+UIyPa15RjbEVd jNMyZELA2fyEUFzgHMw8Hwp6SGTdqS4MYkyAlP8XF//v8BYbBdLijUdZaOoomm6lEYiR hoasquwmgzq5R0p13Ne1hV7e3UXTWuv/Axu3dwbly2KTJgUgtOyzSiLGf6gRl1A30Arh MYArC0CTQ6XC/LWevjfF5MiZm7Cj/SX5WW67ZivoAWMIgwJsWvQS/vgWODdeB8ykLw50 HYhw== X-Gm-Message-State: AGi0PubLItoDXI6NLtSY5Sxay4w9MLSbdCWSuadhtO1PoLlH7REjqZGo 9mQd1a2PLmXHXrehFIohIzWk4L4+e/4= X-Google-Smtp-Source: APiQypKLWjzbU4pWzEa1ngs4etZtw77RC8sOgoc9SPgf3RBlRF3oBET48lqskXkzSFMeQEKT13rD/Q== X-Received: by 2002:a7b:ce81:: with SMTP id q1mr4942337wmj.156.1586948015385; Wed, 15 Apr 2020 03:53:35 -0700 (PDT) Received: from ?IPv6:2a01:36d:111:e013:cccc:9d7d:4b2e:c845? (2a01-036d-0111-e013-cccc-9d7d-4b2e-c845.pool6.digikabel.hu. [2a01:36d:111:e013:cccc:9d7d:4b2e:c845]) by smtp.gmail.com with ESMTPSA id 1sm21933434wmi.0.2020.04.15.03.53.34 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 15 Apr 2020 03:53:34 -0700 (PDT) Subject: Re: Can I find where cygwin is installed (for automation purposes) To: cygwin@cygwin.com References: From: =?UTF-8?Q?Csaba_R=c3=a1duly?= Message-ID: Date: Wed, 15 Apr 2020 12:53:32 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Apr 2020 10:53:37 -0000 Hi Paul, On 15/04/2020 12:29, Paul Moore via Cygwin wrote: > I'm trying to write an automation script that works on a number of > machines. I know that on all machines Cygwin will be installed, but I > cannot guarantee that (1) it will be in the same location on each PC, > or (2) that it will be in PATH. > > There's HKCU\Software\Cygwin\Installations, but that seems to use \?? > prefixes on the PATH, which I'm not sure how to interpret ... On my machine, I have a HKEY_LOCAL_MACHINE\SOFTWARE\Cygwin\setup key, which contains a string value named "rootdir" with the date "C:\cygwin64". Csaba -- You can get very substantial performance improvements by not doing the right thing. - Scott Meyers, An Effective C++11/14 Sampler So if you're looking for a completely portable, 100% standards-conformat way to get the wrong information: this is what you want. - Scott Meyers (C++TDaWYK)