[wpkg-users] Uninstall msi packages with wmic

Vincent Sneyers vince.sneyers at gmail.com
Wed Jul 27 05:34:13 CEST 2011


Hi folks!

First of all, I would like to thanks you for developping WPKG.
I'm using it since years and it's the first time I'm writing to this mailing
list. I've already updated the F-prot script last years but today I think
I've found something interesting about the way of uninstalling msi package
on client computers.

I was quite bored searching registry about the "uninstall string" of a msi
package. Those are changing on each version and, of course, 32 & 64bits are
different.
If you've a look at the java package (best sample), there's a long list of
different uninstall string for each update. I find this really annoying
personnaly.

My small workaround is quite simple (IMHO)

In the package, I'm calling a batch file         <remove
cmd='%SOFTWARE%\Java\uninstall.bat' />
If you have a look into that file:

echo Uninstalling
wmic product where "name like 'Java(TM) 6 Update%%'" call uninstall

Wmic could find with a simple query the uninstall string and call directly
(and silently!) the uninstaller!
Within this sample, I'm asking to find a package starting with 'Java(TM) 6
Update...'

I don't really like batch files with WPKG. Unfortunately, with the ' " en %
characters I'm having problems into packages.xml.
If you find this interesting, may wpkg.js handle this natively in the
future?

Waiting for your feedback & regards from Belgium ;-)
Vincent
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wpkg.org/pipermail/wpkg-users/attachments/20110727/e0887c1a/attachment-0001.html>


More information about the wpkg-users mailing list