logo       

Re: How to uninstall temp files generated for executable ?: msg#00042

Subject: Re: How to uninstall temp files generated for executable ?
On 10 Jul 2004 at 11:41, Dean Arnold wrote:

> Is there a scriptable way to locate and delete the
> temp directory used to cache the perl distro for an executable
> built with pp ?
> I don't mean pp -C, as I do want to persist the cache as long
> as the app is installed. But when the user uninstalls, it would
> be nice to clean out all those temp files.
> 
> Does pp/PAR generate its temp directory name at build time,
> or at install time ? Or maybe that needs to be added as
> a command line switch so the user can supply a fixed
> directory name ? Are there any identifiable crumbs
> in the temp directory that can be used to identify
> something as belonging to a specific pp generated application ?
> 
> TIA,
> Dean Arnold
> Presicient Corp.

The executable does generate its temp dir name at run time, but it is entirely 
predictable before (and after :) When not using -C, it is $ENV{TEMP} plus 
"\par-$USER" 
(where $USER is the login name) plus "\cache-" plus the SHA1 hash of the 
executable. 
For example:

  c:\temp\par-astewart\cache-1a6deca675169d47838e9faf5a23cfb644890bad

on my environment, where:

  TEMP=c:\temp
  USERNAME=astewart

and the SHA1 for the executable is 1a6deca675169d47838e9faf5a23cfb644890bad. 
You can 
compute the SHA1 as soon as you've run pp to put in an un-install routine.

On the other hand, if that's too much, you can set PAR_GLOBAL_TEMP to something 
and the 
PAR will unpack right there, without any par-$USER or cache- xxx stuff. Of 
course, all 
PAR executables will unpack there.

On the third hand, if you are not using "pp -d", the unpacked executable in the 
temp 
cache has the same name as the original PAR executable, you could search TEMP 
for it 
and delete whatever directory you found it in.

Note that if you edit the application and re-run pp, the application has a 
different 
SHA1 hash and uses a different temp dir.

Alan Stewart






<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
boot-loaders.gr...    php.pear.genera...    debugging.valgr...    kde.redhat.user...    text.xml.xsl.ge...    culture.languag...    hardware.microc...    java.servicemix...    redhat.release....    web.zope.plone....    user-groups.lin...    opendarwin.webk...    video.mjpeg.use...    sysutils.bcfg2....    encryption.gpg....    lx-office.devel...    xfree86.forum/2...    mail.mutt.devel...    acpi.devel/2003...    qnx.openqnx.dev...    network.irc.irs...    freebsd.devel.m...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe