X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Message-ID: <4990D05A.4050202@cygwin.com> Date: Mon, 09 Feb 2009 19:54:50 -0500 From: "Larry Hall (Cygwin)" Reply-To: cygwin AT cygwin DOT com User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.19) Gecko/20090101 Remi/2.0.0.19-1.fc8.remi Lightning/0.9 Thunderbird/2.0.0.19 Mnenhy/0.7.5.0 MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: How does one find "cygdrive path" in a Win ".bat" file (was Re: Bug in "startXwin.bat") References: <4990B031 DOT 4050807 AT tlinx DOT org> <4990B128 DOT 7030004 AT cygwin DOT com> <4990CB8D DOT 3050704 AT tlinx DOT org> In-Reply-To: <4990CB8D.3050704@tlinx.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: 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 Linda Walsh wrote: > Larry Hall (Cygwin X) wrote: >> Linda Walsh wrote: >>> The startxwin.sh script works, but startxwin.bat does not work if >>> your Cygwin installation isn't in the default location. >>> >>> You could use "mount -p" (presuming your cygwin\bin is in your >>> windows path, as mine is). >>> >>> If not, need to look in the registry: >>> "\HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts >>> v2\cygdrive prefix" >> >> No, you don't need to look in the registry. There's nothing there that >> 'mount' won't tell you. Forget about the registry. You'll be better >> off, especially when Cygwin 1.7 is released. > --- > I'm curious -- how does mount find or 'know' the cygdrive path > if it doesn't come from the registry. How it finds it is an implementation detail. There's no need to know how it does what it does if it does what you want. ;-) And, like I said, the registry won't be used for 1.7 so anyone that uses this as a basis of anything will find it "broken" once 1.7 is released. > For that matter, how would a windows .bat file find the > 'mount.exe' binary if the .bat file doesn't know 'cygdrive path'? That's a different issue. However you imply a paradox that doesn't exist. Whether one knows the 'cygdrive path' or not will not make it easier to find 'mount.exe'. 'mount.exe' is always in '/bin'. As for the issue of finding '/bin', there may be times when it is necessary to script this, though I would say this is not one of those cases. For those cases, searching the file-system or spelunking in the registry are possible avenues, each with their own pluses and minuses. In this case, just looking at 'cygwin.bat' will provide the answer needed. -- Larry Hall http://www.rfk.com RFK Partners, Inc. (508) 893-9779 - RFK Office 216 Dalton Rd. (508) 893-9889 - FAX Holliston, MA 01746 _____________________________________________________________________ A: Yes. > Q: Are you sure? >> A: Because it reverses the logical flow of conversation. >>> Q: Why is top posting annoying in email? -- 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/