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: <7ff9c2a10510251559x2aa2a4c3q6571a47b049d7a03@mail.gmail.com> Date: Tue, 25 Oct 2005 15:59:11 -0700 From: Svend Sorensen To: cygwin AT cygwin DOT com Subject: Re: AllVersions: Running Cygwin X w/ Registy Entries In-Reply-To: <1130262948.435e71a4abd76@webmail.mail.gatech.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Disposition: inline References: <1130262948 DOT 435e71a4abd76 AT webmail DOT mail DOT gatech DOT edu> X-IsSubscribed: yes Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id j9PMxKHb018033 On 10/25/05, gtg793x AT mail DOT gatech DOT edu wrote: > Greetings > I would like to be able to have a portable version of cygwin in my Flash Drive. > I have been able to do it but it requires that I enter some registry entries > such as: > > [HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/] > Here are the batch files I use. In their current state, they must exist in the parent directory of the cygwin root, which must be named "cygwin". install.bat backs up the current cygwin mount table, then creates a new table for the removable device. It uses the users Windows %TEMP% dir for /tmp, because I wanted to minimize writes to the flash disk. uninstall.bat removes the new mount table, and restores the backed up copy. --begin install.bat-- @echo off for /F %%A in ('cd') do set WD=%%A cygwin\bin\mount -m | cygwin\bin\sed s/mount/"cygwin\/bin\/mount"/ > %TEMP%\cygwin-mounts cygwin\bin\umount -c cygwin\bin\umount -A cygwin\bin\mount --binary --force --user %WD%\cygwin / cygwin\bin\mount --binary --force --user %WD%\cygwin\bin /usr/bin cygwin\bin\mount --binary --force --user %WD%\cygwin\lib /usr/lib cygwin\bin\mount --binary --force --user %TEMP%\ /tmp --end install.bat-- --begin uninstall.bat-- @echo off for /F %%A in ('cd') do set WD=%%A cygwin\bin\umount -c cygwin\bin\umount -A cygwin\bin\sh %TEMP%\cygwin-mounts cygwin\bin\rm %TEMP%\cygwin-mounts --end uninstall.bat-- -- 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/