This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
Re: cygwin on removable media ...
- From: Doru Carastan <Doru at rocketmail dot com>
- To: cygwin at cygwin dot com
- Date: Thu, 3 Oct 2002 12:35:36 -0700 (PDT)
- Subject: Re: cygwin on removable media ...
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/