From mboxrd@z Thu Jan 1 00:00:00 1970
Return-Path:
Received: from mail-qk1-x72d.google.com (mail-qk1-x72d.google.com
[IPv6:2607:f8b0:4864:20::72d])
by sourceware.org (Postfix) with ESMTPS id A1511385DC1C
for ; Wed, 15 Apr 2020 10:29:42 +0000 (GMT)
DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org A1511385DC1C
Received: by mail-qk1-x72d.google.com with SMTP id j4so16549916qkc.11
for ; Wed, 15 Apr 2020 03:29:42 -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:from:date:message-id:subject:to;
bh=7itqTvgPCw7kS3l3M53QHxDSO32VUMZruBOxiY1jhNU=;
b=GIsF/tDn5h634KisCFZmYYMchMuPPwS9zpGX3ddwnOovcIgKXXD0QWJuARFnvsGBON
AVk9Yak8j1h+91cqXYjNSUHdNevBjAnhscXuG5tYG/6ve5VIoX/2zrFBTeL6ZMdw0G7N
PL9hOLxwvbDE+03CLYoQp8hitvJyPAmKYYIcvNZ/nfdiUM+eBkX30e/GW+ZAAo3vn3Cn
iwbChnr4IBuam4l460nRQO6K+ZGik5PPwPjFiSeE9BC2r46qqMCzR8t/G2zO/pBpDVlk
PmKvmB0Xh2JaXvtom/VECx2y//CvaqriZhIWmwruOzCI4nkKwPvP9scnmY44Q99lSCxU
PAIA==
X-Gm-Message-State: AGi0PuYzJ0Li/INevKo7DnBSE9aKRzowbSD3XDLLAqeuD6pwZ/nifAc3
n+dyTOaN66+WVk+5JjC3XQoZXCTWS3vRE9y1QsAwR2qu/pc=
X-Google-Smtp-Source: APiQypIki877cS9C5dxxTXdNR8zJmAFUPi2DYvh6X8Nwj1wVVmV052rCzQBCPL26CIDQRdc4BUbRcXALDb4lnze8z7s=
X-Received: by 2002:a37:d93:: with SMTP id 141mr14805447qkn.32.1586946581661;
Wed, 15 Apr 2020 03:29:41 -0700 (PDT)
MIME-Version: 1.0
From: Paul Moore
Date: Wed, 15 Apr 2020 11:29:30 +0100
Message-ID:
Subject: Can I find where cygwin is installed (for automation purposes)
To: cygwin@cygwin.com
Content-Type: text/plain; charset="UTF-8"
X-Spam-Status: No, score=-2.6 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:29:43 -0000
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 (I know
about \\?\ prefixes, but this is different, I assume?), and it also
includes some non-Cygwin things (one machine I have, has
\??\C:\PROGRA~1\ConEmu\ConEmu
So far, the best I can see is to try every entry in there, strip \??,
and look for a cygwin1.dll, and use the first entry I find that works.
But that seems a bit arbitrary. Is there a better way?
Thanks,
Paul