[wpkg-users] How to handle unknown uninstaller name?

Robin Roevens robin.roevens at cocks.be
Mon Sep 7 09:20:49 CEST 2009


I have expierienced that applications like Gimp, PDFCreator, and others 
indeed start using uninsXXX files with XXX != 000 when removed and/or 
reinstalled.. 
Most of the time this gives me multiple uninsXXX.exe files, but only one 
valid uninsXXX.dat file making that executing any uninsXXX command that 
hasn't the same number XXX as the only uninsXXX.dat file results in a 
dialog box with an error, which doesn't dissapear from itself, hence 
blocking further wpkg processing (or waiting for a wpkg timeout). Hence 
making the FOR method invalid in this case...

I myself solve this quite simple by adding a few remove commands like 
this:
<remove cmd='%comspec% /c if exist "%ProgramFiles%\Gimp\unins000.dat" 
"%ProgramFiles%\Gimp\unins000.exe" /verysilent /norestart' />
<remove cmd='%comspec% /c if exist "%ProgramFiles%\Gimp\unins001.dat" 
"%ProgramFiles%\Gimp\unins001.exe" /verysilent /norestart' />
<remove cmd='%comspec% /c if exist "%ProgramFiles%\Gimp\unins002.dat" 
"%ProgramFiles%\Gimp\unins002.exe" /verysilent /norestart' />

Robin

wpkg-users-bounces at lists.wpkg.org wrote on 06.09.2009 16:33:35:

> From:
> 
> Kevin Keane <subscription at kkeane.com>
> 
> To:
> 
> Cc:
> 
> "wpkg-users at lists.wpkg.org" <wpkg-users at lists.wpkg.org>
> 
> Date:
> 
> 06.09.2009 16:34
> 
> Subject:
> 
> Re: [wpkg-users] How to handle unknown uninstaller name?
> 
> Sent by:
> 
> wpkg-users-bounces at lists.wpkg.org
> 
> Pendl Stefan wrote:
> >> I'm trying to create a package.xml file for Aspell and a couple of
> >> dictionaries.
> >>
> >> The problem I am having is how to create the <remove> entry.
> >> Aspell uses
> >> an uninstaller of the style
> >>
> >> "%PROGRAMFILES%\Aspell\uninsXXX.exe"
> >>
> >> where XXX is a number.
> >>
> >> 
> >
> > You can use FOR and %ComSpec%, but that will remove from 000 to x.
> >
> > You can count with FOR too, if you know the exact number of files:
> >
> > <remove cmd='%ComSpec% /c FOR /L %C in (9,-1,0) do "%PROGRAMFILES%
> \Aspell\unins00%C.exe"' />
> >
> > If the number exceeds 9 you need to add another line as follows:
> >
> > <remove cmd='%ComSpec% /c FOR /L %C in (99,-1,10) do "%
> PROGRAMFILES%\Aspell\unins0%C.exe"' />
> >
> > You need at least Windows XP to make this work, I think.
> >
> > The other solution is creating a file containing all the unins... 
> file names, sorting it in reverse order and run each of the files.
> >
> > For batch scripting, you can find many hints at http://
> www.robvanderwoude.com/.
> >
> > You could create a JS script or batch file to do this too, so you 
> could add more error checking there
> Thank you and Tomasz for your suggestions! In the end, this is really 
> only a partial solution because it doesn't allow removing only one of 
> the packages involved and leaving the others intact. For my needs, it is 

> sufficient, just feels inelegant...
> 
> There is a second scenario where the same issue also arises. Gimp, 
> Gnucash, PDFCreator and quite a few other applications use the same 
> installer, and if you reinstall them manually, you may also end up with 
> such a non-000 uninstaller. In that case, the FOR loop should do the 
> trick, I think.
> 
> In either case, do you by any chance know what happens to the return 
codes?
> 
> -- 
> Kevin Keane
> Owner
> The NetTech
> Find the Uncommon: Expert Solutions for a Network You Never Have to 
> Think About
> 
> Office: 866-642-7116
> http://www.4nettech.com
> 
> This e-mail and attachments, if any, may contain confidential and/or
> proprietary information. Please be advised that the unauthorized use
> or disclosure of the information is strictly prohibited. The 
> information herein is intended only for use by the intended 
> recipient(s) named above. If you have received this transmission in 
> error, please notify the sender immediately and permanently delete 
> the e-mail and any copies, printouts or attachments thereof.
> 
> 
-------------------------------------------------------------------------
> wpkg-users mailing list archives >> http://lists.wpkg.org/pipermail/
> wpkg-users/
> _______________________________________________
> wpkg-users mailing list
> wpkg-users at lists.wpkg.org
> http://lists.wpkg.org/mailman/listinfo/wpkg-users

--
Denk aan het milieu - is het nodig deze mail te printen?

** Email Disclaimer:
** This e-mail and the information it contains may be confidential, legally privileged and protected by law.  Access by the intended recipient only is authorised.  If you are not the intended recipient, please notify the sender immediately and delete this e-mail from your system.  Any review, distribution, reproduction, publication or other use of this e-mail by persons or entities other than the intended recipient is prohibited.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wpkg.org/pipermail/wpkg-users/attachments/20090907/98f166e4/attachment-0002.html>


More information about the wpkg-users mailing list