delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/11/22/17:37:44

X-Spam-Check-By: sourceware.org
Date: Tue, 22 Nov 2005 17:37:28 -0500 (EST)
From: Igor Pechtchanski <pechtcha AT cs DOT nyu DOT edu>
Reply-To: cygwin AT cygwin DOT com
To: Lennart Borgman <lennart DOT borgman DOT 073 AT student DOT lu DOT se>
cc: cygwin AT cygwin DOT com
Subject: Re: Where is cygwin bin directory?
In-Reply-To: <438395AC.20903@student.lu.se>
Message-ID: <Pine.GSO.4.63.0511221732310.8033@slinky.cs.nyu.edu>
References: <4383616A DOT 4050608 AT student DOT lu DOT se> <20051122183415 DOT GB23653 AT trixie DOT casa DOT cgf DOT cx> <438395AC DOT 20903 AT student DOT lu DOT se>
MIME-Version: 1.0
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

On Tue, 22 Nov 2005, Lennart Borgman wrote:

> Christopher Faylor wrote:
>
> > On Tue, Nov 22, 2005 at 07:20:26PM +0100, Lennart Borgman wrote:
> >
> > > Is the path to Cygwin bin directory available in windows registry?
> > >
> > > It would be nice if it were there since that would make it easier to use
> > > Cygwin from other programs.
> >
> > "man cygpath"
> > "man mount"
>
> Thanks Christopher, it was not what I asked for, but I realized I should
> have been more clear.
>
> I want to start Cygwin from within an application. It is in a package
> that will be distributed to many computers and I have no idea at all if
> Cygwin is installed and in that case where it is installed. MS
> recommends that you put this information in the Windows Registry...
>
> Maybe that pattern does not fit Cygwin very well, but I hoped that the
> information was available in some other OFFICIAL place in the Windows
> Registry. Your answer however led me to remember a place in the registry
> where I currently can get this information:
>
>   HKLM\SOFTWARE\Cygnus Solution\Cygwin\mounts v2\/\native
>
> The problem is that it does not look as official information I can trust
> to be there tomorrow. So I would still like to know where to find this
> information in Windows Registry (if it is there?).

This is a valid concern, and yes, using cygpath or mount won't help here.
You'll need to do exactly what Cygwin's setup.exe installer is doing -- it
can be guaranteed that whatever way there is to find Cygwin on the
machine, setup.exe is going to use it.  Also, setup is a pure Windows
application, so it doesn't use Cygwin internal calls, but has its own way.

For now, this means that you can look at the above registry, but do track
setup development very closely (maybe even subscribe to the
cygwin-apps-cvs list).  If the means for finding the location of Cygwin
ever changes, setup will have to reflect it.  It would arguably be "a good
thing" (tm) to extract that portion of setup code into a library that
other Windows applications can also link in.  SHTDI, though.
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha AT cs DOT nyu DOT edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor AT watson DOT ibm DOT com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

If there's any real truth it's that the entire multidimensional infinity
of the Universe is almost certainly being run by a bunch of maniacs. /DA

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019