From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17396 invoked by alias); 7 Apr 2010 11:40:51 -0000 Received: (qmail 17388 invoked by uid 22791); 7 Apr 2010 11:40:50 -0000 X-Spam-Check-By: sourceware.org Received: from aquarius.hirmke.de (HELO calimero.vinschen.de) (217.91.18.234) by sourceware.org (qpsmtpd/0.83/v0.83-20-g38e4449) with ESMTP; Wed, 07 Apr 2010 11:40:46 +0000 Received: by calimero.vinschen.de (Postfix, from userid 500) id 895A96D41A0; Wed, 7 Apr 2010 13:40:43 +0200 (CEST) Date: Wed, 07 Apr 2010 11:40:00 -0000 From: Corinna Vinschen To: cygwin@cygwin.com Subject: Re: Setup 2.693 unable to replace files through reboot Message-ID: <20100407114043.GA18530@calimero.vinschen.de> Reply-To: cygwin@cygwin.com Mail-Followup-To: cygwin@cygwin.com References: <20100406182421.GA19588@ednor.casa.cgf.cx> <20100407082714.GC27428@calimero.vinschen.de> <20100407111449.GZ18530@calimero.vinschen.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100407111449.GZ18530@calimero.vinschen.de> User-Agent: Mutt/1.5.20 (2009-06-14) Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com X-SW-Source: 2010-04/txt/msg00299.txt.bz2 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