delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/10/03/15:35:47

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/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
Message-ID: <20021003193536.78534.qmail@web12505.mail.yahoo.com>
Date: Thu, 3 Oct 2002 12:35:36 -0700 (PDT)
From: Doru Carastan <Doru AT rocketmail DOT com>
Subject: Re: cygwin on removable media ...
To: cygwin AT cygwin DOT com
MIME-Version: 1.0

Max,

You should stay out of editing the registry and use some Cygwin
programs which know where to look and what to change there.  I am using
a batch script to switch between various cygwin versions installed on
my computer.  It essentially does the following:

@Echo off
Rem Edit cygwinRoot to match your drive\cygwinDirectory or just set it
to %1\ and pass it as a parameter to the script
set cygwinRoot=J:\cygwin\

set cygwinBin=%cygwinRoot%bin
%cygwinBin%\umount -U
%cygwinBin%\umount -S
%cygwinBin%\umount -c -u
%cygwinBin%\umount -c -s

rem Check to see if there is anything left
%cygwinBin%\mount
%cygwinBin%\mount -p

%cygwinBin%\mount -c -b -u /cygdrive
%cygwinBin%\mount -c -b -s /cygdrive
%cygwinBin%\mount -b -s %cygwinRoot% /
%cygwinBin%\mount -b -s -f %cygwinRoot%bin /usr/bin
%cygwinBin%\mount -b -s -f %cygwinRoot%lib /usr/lib

if exist "%temp%" %cygwinBin%\mount -b -s -f "%temp%" /tmp


If you plan to run it on NT hosts save it as a .cmd file in your
removable media cygwin root. You can then figure out on the fly what
that dir is using:

rem The root is the directory of this file
rem NOTE: It will have a trailing \
for /F %%i in ('ECHO %0') do set cygwinRoot=%%~dpi

The alternative is to write your own C code that runs the umount and
mount commands. It will work on all win32 hosts.

Hope it helps,
Doru Carastan

__________________________________________________
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com

--
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/

- Raw text -


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