[wpkg-users] Removing old Java versions & WMI/registry tricks [was Use regex to get installed version number?]

Falko Trojahn wpkg at trojahn.de
Wed Apr 15 15:58:18 CEST 2015


Hello Will,

Will Aoki wrote on 13.04.2015 23:06:
> On Thu, Apr 09, 2015 at 06:20:55PM -0600, Will Aoki wrote:
>> I haven't integrated into the package yet, but I plan to do it tomorrow.
>> Until then, here's what I'm doing:
>
> Here are better ways to do it. These (a) use %shortupdatever% from the
> package definition, (b) block until msiexec is done and (c) work even
> when Oracle decided that the UninstallString should do "msiexec /i".
>
> [Convert]::ToBase64String([Text.Encoding]::Unicode.GetBytes({
> foreach ($i in get-itemproperty HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\* |
>     where-object {$_.displayname -like "Java 8*" } |
>     where-object {$_.displayname -notlike "Java 8 Update $env:shortupdatever*"} ) {
>    msiexec /x $i.PSChildName.ToString() /qn | write-output
> }}))
>
> [Convert]::ToBase64String([Text.Encoding]::Unicode.GetBytes({
> foreach ($i in get-itemproperty HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\* |
>     where-object {$_.displayname -like "Java 8*" } |
>     where-object {$_.displayname -notlike "Java 8 Update $env:shortupdatever*"} ) {
>    msiexec /x $i.PSChildName.ToString() /qn | write-output
> }}))
>

would you mind posting your whole java8 package xml, please,
or - put it in the wiki?

Thank you,
Falko




More information about the wpkg-users mailing list