Remove-MSIApplications, exclude Java 64 bit

Hello

I have a deployment for latest Java 8 with PSAPPDEPLOYTOOLKIT. Right now I have this in my powershell script to uninstall old java versions:

Remove-MSIApplications “Java™ 6 Update”
Remove-MSIApplications “Java 7 Update”
Remove-MSIApplications “Java 8 Update”

Is it possible to exclude uninstallation of Java 8 64 bit?

That is not possible with the current version of the toolkit. However, I just pushed an update to the latest 3.6.5 beta that adds this ability. You can find the beta here (make sure to download all the files in this directory): https://github.com/PSAppDeployToolkit/PSAppDeployToolkit/tree/master/Toolkit/AppDeployToolkit

Please test and let me know if it is working as expected. You can look at the example I added to the function comments to see how to use the -ExcludeFromUninstall parameter.

The following syntax is not doing the job for me. The script keeps uninstalling Acrobat Reader as well.
Am I missing something here? Tx

    Remove-MSIApplications -Name 'Adobe' -ExcludeFromUninstall @(
    @('DisplayName', '*Flash Player*', 'WildCard'),
    @('DisplayName', '*ShockWave Player*', 'WildCard'),
    @('DisplayName', '*Acrobat Reader*', 'WildCard')
    )

If it contributes to someone

To the question “Is it possible to exclude uninstallation of Java 8 64 bit?”

I use:

$AppList = Get-InstalledApplication "Java 8 Update"
if ($AppList)
{
ForEach ($App in $AppList)
{If (!($App.Is64BitApplication))
{...remove...

If anyone else is looking at this here is how we excluded 64-bit Java:

Remove-MSIApplications -Name ‘Java 8 Update’ -FilterApplication (,(‘Is64BitApplication’, $false, ‘Exact’))

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.