delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2010/04/07/07:40:55

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Date: Wed, 7 Apr 2010 13:40:43 +0200
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: Setup 2.693 unable to replace files through reboot
Message-ID: <20100407114043.GA18530@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <op DOT vaq3wunh1e62zd AT balu DOT cs DOT uni-paderborn DOT de> <20100406182421 DOT GA19588 AT ednor DOT casa DOT cgf DOT cx> <20100407082714 DOT GC27428 AT calimero DOT vinschen DOT de> <20100407111449 DOT GZ18530 AT calimero DOT vinschen DOT de>
MIME-Version: 1.0
In-Reply-To: <20100407111449.GZ18530@calimero.vinschen.de>
User-Agent: Mutt/1.5.20 (2009-06-14)
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
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

On Apr  7 13:14, Corinna Vinschen wrote:
> On Apr  7 10:27, Corinna Vinschen wrote:
> > On Apr  6 14:24, Christopher Faylor wrote:
> > > On Tue, Apr 06, 2010 at 07:23:08PM +0300, Matthias Andree wrote:
> > > >Greetings,
> > > >
> > > >I have observed multiple times, and reproduced, that Setup 2.693  
> > > >overwriting "in-use files" and rebooting WILL NOT replace those in-use  
> > > >files. Notably cygwin1.dll.
> > > >[...]
> > > 
> > > It works fine on Windows XP.  I can't test Windows 7 easily.  Corinna
> > > do you have time to test this?
> > 
> > I'll have a look.
> 
> I can confirm the problem on W7.
> 
> The mechanism in setup apparently works fine at the first glance.  After
> the call to MoveFileEx, a new registry entry "PendingFileNameOperations"
> in the "Session Manager" key has been created, as expected.  The content
> looks sound.
> 
> After reboot, the PendingFileNameOperations entry has disappeared from 
> the registry, but the Cygwin DLL hasn't changed.  I can reproduce the
> same issue with any other file on the C: drive.  MoveFileEx works, but
> the file is not renamed after reboot.
> 
> Here's the catch.  Per the documentation in
> http://msdn.microsoft.com/en-us/library/aa381498%28VS.85%29.aspx there's
> an additional registry value "AllowProtectedRenames" to set, if WFP
> protected files have to be replaced on reboot, apparently already
> starting with Windows Server 2003 R2, or 2003 SP1.  I was surprised that
> this covered all files on the C: drive, but looking into the "System
> Protection" tab in the "System Properties" dialog shows that the entire
> C: drive is under protection by default.
> 
> That means, if we want the replacement mechanism to work, we must
> also create the "AllowProtectedRenames" value in the "Session Manager"
> registry key every time the MoveFileEx is called successfully.
> 
> I'll create a patch in the next couple of days if nobody beats me to it.

I just applied the matching patch.  Chris, could you please upload
a new setup.exe?


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


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