This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Where is cygwin bin directory?

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.
      |\      _,,,---,,_
ZZZzz /,`.-'`'    -.  ;-;;,_
     |,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:
Problem reports:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]