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 From: "Hannu E K Nevalainen" <_garbage_collector_ AT telia DOT com> To: Subject: RE: A good way to test if cygwin isn't installed? Date: Sun, 3 Oct 2004 20:02:48 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit In-Reply-To: X-IsSubscribed: yes I wrote: > you wrote: >> On Fri, Oct 01, 2004 at 01:19:39PM -0400, Christopher Faylor wrote: >>> On Fri, Oct 01, 2004 at 06:08:48PM +0100, Hughes, Bill wrote: >>>> Andrew DeFaria wrote: >>>>> Christopher Faylor wrote: >>>> ..snip.. >>>>>> If you have cygwin programs available to you, then use the mount >>>>>> command. If the only output from the mount command is of the >>>>>> "noumount" variety then cygwin isn't installed in any meaningful >>>>>> way. >>>>> >>>>> Personally I would consider the existence or non-existence of >>>>> cygwin1.dll to be a more definitive measure of whether or not >>>>> Cygwin is installed in a "meaningful" way. >>>> I think it may be possible to cygwin installed and not have it in >>>> the path, if it's started from a bat or cmd that modifies the path >>>> etc... anyway, finding cygwin1.dll may be a slow process. It might >>>> be better to access the registry, this jscript uses the windows >>>> scripting host, so won't work on older boxes unless wsh is there, >>>> but as a proof of concept it may be ok. >>> >>> Just having "mount.exe" and "cygwin1.dll" in the same directory and >>> running "mount" should be adequate. >>> >>> If "mount" exits with a "multiple cygwin problem" then, well... Hmm... For me this works no matter what I do... does it have to be two DIFFERING versions of cygwin1.dll to trigger this thingie? Having mount.exe and cygwin1.dll in a specific dir and then run "mount -m" after "set PATH=." should be the way to go. /Hannu E K Nevalainen, B.Sc. EE Microcomputer systems --72--> >>> >>> If "mount" shows more than just /cygdrive paths, then cygwin >> isn't installed >> ^ >> nothing >>> in any useful way. > > > i.e. the output of "mount -m" would be empty. > Or does a default cygdrive prefix show up there? Test run on Win2000: C:\DOCUME~1\Annika\LOCALS~1\Temp\z>dir Volume in drive C has no label. Volume Serial Number is 749C-8A3A Directory of C:\DOCUME~1\Annika\LOCALS~1\Temp\z 2004-10-03 19:34 . 2004-10-03 19:34 .. 2004-09-30 20:20 1 140 105 cygwin1.dll 2004-09-05 05:18 12 288 mount.exe 2 File(s) 1 152 393 bytes 2 Dir(s) 174 979 072 bytes free C:\DOCUME~1\Annika\LOCALS~1\Temp\z>mount -m C:\DOCUME~1\Annika\LOCALS~1\Temp\z>mount c: on /cygdrive/c type user (binmode,noumount) C:\DOCUME~1\Annika\LOCALS~1\Temp\z> -- Another Win2000 test, this time w cygwin installed: Microsoft Windows 2000 [Version 5.00.2195] (C) Copyright 1985-2000 Microsoft Corp. ... >D: D:\>cd %TEMP% D:\TEMP>mkdir z D:\TEMP>cd z D:\TEMP\z>copy c:\program\cygwin\bin\cygwin1.dll . 1 file(s) copied. D:\TEMP\z>copy c:\program\cygwin\bin\mount.exe . 1 file(s) copied. D:\TEMP\z>set OLDPATH=%PATH% D:\TEMP\z>set PATH=. D:\TEMP\z>mount -m mount -f -s -b "C:/Program/Cygwin/bin" "/usr/bin" mount -f -s -b "C:/Program/Cygwin/lib" "/usr/lib" mount -f -s -b "C:/Program/Cygwin" "/" mount -f -s -b "D:/TEMP" "/tmp" mount -s -b --change-cygdrive-prefix "/cygdrive" D:\TEMP\z>set PATH=%OLDPATH% D:\TEMP\z>echo %PATH% F:\WINNT\system32;F:\WINNT;F:\WINNT\System32\Wbem; D:\TEMP\z> ** mailing list preference; please keep replies on list ** -- printf("LocalTime: UTC+%02d\n",(DST)? 2:1); -- --END OF MESSAGE-- -- 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/