Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <00ab01c2f3d4$e9b05920$cf6d86d9@ellixia> From: "Elfyn McBratney" To: "cygwin" , "Andrew DeFaria" References: <200303261832 DOT 53052 DOT jld AT ecoscentric DOT com> <3E81FE8B DOT 9060008 AT Salira DOT com> Subject: Re: Determining the location of a Cygwin installation Date: Wed, 26 Mar 2003 20:16:08 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300 > Rolf Campbell wrote: > > > You mean "cygpath -w -p /bin", because he said "I need to determine > > the native path to the directory containing cygwin1.dll" > > He also said he needed to determine this from "outside the Cygwin > environment" and I would think that cygpath is inside the Cygwin > environment. Think about it. You're in cmd.exe and you want to tell > where Cygwin is installed. How can you execute cygpath without knowing > where cygpath is? The only way that would work is if Cygwin's bin path > is already in PATH and this is not set by default when Cygwin is installed. > > Personally I vote for a simple base like registry variable that plainly > states where Cygwin was installed. It seems to me to make the most sense > to have one globally accessible place where you can find Cygwin's > installation path and then you can take it from there. Relying on > anything within Cygwin's installation path presupposes that the person > knows Cygwin's installation path! But this is just my opinion... But as cgf (the Really Cool Manager) said the registry keys are not to be relied on as they might not be there forever. Thinking about this I'd use Win32 API calls (FindFirstFileEx and CreateFile) to search a drive for items named "bin" and see if it's a) a folder and b) contains cygwin1.dll . Regards, Elfyn McBratney elfyn AT exposure DOT org DOT uk www.exposure.org.uk -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/