From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-x331.google.com (mail-wm1-x331.google.com [IPv6:2a00:1450:4864:20::331]) by sourceware.org (Postfix) with ESMTPS id 02DE2385DC1C for ; Wed, 15 Apr 2020 10:52:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 02DE2385DC1C Received: by mail-wm1-x331.google.com with SMTP id a201so18047553wme.1 for ; Wed, 15 Apr 2020 03:52:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=qBTPhmI32wbv8Nn8HaSarTijum8a1qsO9LoNnCIhuNE=; b=tlIV/61VKsKgk4BHAXbJzE39KfjHVn4/uFYpijA3H5qsAXSQiDvL30fR05OvxUL7lA Ax2f3kFt6hL2UoqvHXd5oj1ybY9WpOJ5hzIYJEmIC59FoB71n8/GKNXUFDdNXnrAVxP0 voY9hm83kEVoXoNrXeSS4BVkoOehZOoP0tiGau1NB529ZwJx8i8P9W8MLeS87BozZ005 OaHW3sjPIim1tPPAVNgRNb7+3hQEDO+H+gtPhoDF+37sj3TvoKLQSlHxgizfh9OJxqnL D8takNO/VNP43ETiKGXJVO+yauZJ30MU7dW1rhMWSr00QFB2ho+f6j5Wl2rMsAC5EBZC UVjA== X-Gm-Message-State: AGi0PuYRDnANFXO1EXFr+ryXX8z+C59GbrbAjiodsuWxYi1lkwTL2/YQ sBQsC6BNNCCbagsGJ6HHiIePWhIf2T6hpxf7taA= X-Google-Smtp-Source: APiQypLTjjKkFWEVIT0EtrogbBXkDIlasbOufO1k98Lahj8tqj9t9i4lYN9EhbJrhHnuMAue8RMRepob9nOznSBqT4A= X-Received: by 2002:a1c:c2d6:: with SMTP id s205mr4862600wmf.90.1586947926596; Wed, 15 Apr 2020 03:52:06 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Csaba Raduly Date: Wed, 15 Apr 2020 12:51:53 +0200 Message-ID: Subject: Re: Can I find where cygwin is installed (for automation purposes) To: Paul Moore Cc: cygwin list X-Spam-Status: No, score=-0.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, HTML_MESSAGE, 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 Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 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:52:09 -0000 Hi Paul, On Wed, Apr 15, 2020 at 12:30 PM 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-conformant way to get the wrong information: this is what you want. - Scott Meyers (C++TDaWYK)