delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/02/20/19:00:44

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/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: Fri, 20 Feb 2004 19:00:16 -0500
From: Christopher Faylor <cgf-no-personal-reply-please AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: tar and open files
Message-ID: <20040221000016.GA25477@redhat.com>
Mail-Followup-To: cygwin AT cygwin DOT com
References: <F67AB1DD14544242BE5BFE94F5939175B7F298 AT E2KMEMMCS1 DOT ftbco DOT ftn DOT com> <40369C0A DOT 50934507 AT dessent DOT net>
Mime-Version: 1.0
In-Reply-To: <40369C0A.50934507@dessent.net>
User-Agent: Mutt/1.4.1i
X-IsSubscribed: yes
Reply-To: cygwin AT cygwin DOT com

On Fri, Feb 20, 2004 at 03:45:14PM -0800, Brian Dessent wrote:
>"DePriest, Jason R." wrote:
>> 
>> For a DLL, does just unregistering the DLL do what you need?  I mean,
>> running 'regsvr32 /u <dll>', put new file in place, run 'regsvr32
>> <dll>'?
>
>No.  The replacement only occurs at boot-time.
>
>I don't know if this is quite off-topic or not but I wrote the following
>perl script which reads the list of Pending File Rename Operations (to
>occur at next boot time) and outputs a shell script to perform them. 

If it is off-topic, I'll grant it a special dispensation for showing an
interesting technique.

I had no idea you could do this.

Thanks for sharing it with us.  I think I can use this.

cgf

>
>#!/usr/bin/perl -w
>
>use Win32::TieRegistry;
>
>my $pr =
>$Registry->{'HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session
>Manager\PendingFileRenameOperations'};
>
>my @list = split('\0', $pr);
>
>print "# ", join("\n# ", @list), "\n";
>
>while (@list) {
>  my $a = shift @list;
>  my $b = shift @list;
>  
>  if ($b) {
>    print "mv -f " . fix($a) . " " . fix($b) . "\n";
>  } else {
>    print "rm " . fix($a) . "\n";
>  }
>}
>        
>sub fix
>{
>  my $in = shift;
>  
>  $in =~ s%^\!?\\\?\?\\%%;
>  my $foo = quotemeta($in);
>  chomp (my $bar = `cygpath -u $foo`);
>  return "\'$bar\'";
>}
>
>--
>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/

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