delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/01/22/20:09:03

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/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
Date: Sat, 22 Jan 2005 20:08:39 -0500 (EST)
From: Igor Pechtchanski <pechtcha AT cs DOT nyu DOT edu>
Reply-To: cygwin AT cygwin DOT com
To: Joshua Daniel Franklin <joshuadfranklin AT gmail DOT com>
cc: cygwin AT cygwin DOT com
Subject: Re: Multiple installations and 3PPs (FAQ alert)
In-Reply-To: <cb51e2e050122113242522e72@mail.gmail.com>
Message-ID: <Pine.GSO.4.61.0501221959540.8945@slinky.cs.nyu.edu>
References: <41F0D6DB DOT 8010107 AT gmx DOT ch> <Pine DOT LNX DOT 4 DOT 61 DOT 0501210842290 DOT 7094 AT lack DOT ucs DOT indiana DOT edu> <20050121163345 DOT GD20002 AT trixie DOT casa DOT cgf DOT cx> <Pine DOT LNX DOT 4 DOT 61 DOT 0501211757380 DOT 394 AT lack DOT ucs DOT indiana DOT edu> <20050122032443 DOT GB25794 AT trixie DOT casa DOT cgf DOT cx> <6 DOT 2 DOT 0 DOT 14 DOT 0 DOT 20050121231529 DOT 03d50da0 AT pop DOT prospeed DOT net> <20050122043814 DOT GA26399 AT trixie DOT casa DOT cgf DOT cx> <Pine DOT GSO DOT 4 DOT 61 DOT 0501220136300 DOT 29308 AT slinky DOT cs DOT nyu DOT edu> <n9k4v0taq86ho0ihfa4i3qvgs01va8ve15 AT 4ax DOT com> <cb51e2e050122113242522e72 AT mail DOT gmail DOT com>
MIME-Version: 1.0

On Sat, 22 Jan 2005, Joshua Daniel Franklin wrote:

> > On Sat, 22 Jan 2005 01:51:38 -0500 (EST), Igor Pechtchanski wrote:
> >
> > | Should we, perhaps, provide a small 'uninstall' script, maybe in
> > | /usr/sbin, that would perform a umount and then use regtool to remove the
> > | registry key?  It could even be a .bat, which will enable it to delete all
> > | of Cygwin once the last Cygwin process exits...  A postinstall script
> > | could generate it, too, so that it contains explicit paths of the Cygwin
> > | root directory.
>
> I like the idea of it at least saving mounts. And the paths should work
> (note the "bin"). :)

Whoops!  Missed that.

However, the mounts should be saved *inside* uninstall.bat, using a
Windows path.  :-)
Also, since you're *uninstalling* Cygwin, the mounts should go into a
.bat, not a .sh, with a more suggestive name...

------ BEGIN gen-uninst.sh ------
#!/bin/sh
CYGDIR="`/bin/cygpath -aw /`"
cat > /uninstall.bat <<EOF
$CYGDIR\\bin\\mount -m > %TEMP%\\restore-mounts.bat
$CYGDIR\\bin\\umount -s -A
$CYGDIR\\bin\\umount -A
copy $CYGDIR\\bin\\cygwin1.dll $CYGDIR\\bin\\regtool.exe %TEMP%
copy $CYGDIR\\saved-mounts.sh %TEMP%
$CYGDIR\\bin\\rm -rf /
del /s $CYGDIR
%TEMP%\\regtool remove "/HKLM/Software/Cygnus Solutions"
%TEMP%\\regtool remove "/HKCU/Software/Cygnus Solutions"
del %TEMP%\\cygwin1.dll %TEMP%\\regtool.exe
echo Cygwin is now un-installed.
echo To restore the mounts later, run %TEMP%\\restore-mounts.bat
EOF
------- END gen-uninst.sh -------

HTH,
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha AT cs DOT nyu DOT edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor AT watson DOT ibm DOT com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"The Sun will pass between the Earth and the Moon tonight for a total
Lunar eclipse..." -- WCBS Radio Newsbrief, Oct 27 2004, 12:01 pm EDT

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

- Raw text -


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