Hi,
I set the 'Approval' of an update (Java 8 MSI Update) to 'Approval For Uninstallation', which was installed with WSUS before.
On Win7 workstations the uninstallation do work, but on Win10 workstations the update does not appear at all.
Any idea?
Comments: I have created a Custom update to uninstall all old version of java and then install the new version. I test for both 32 & 64 bit OS's The first text file I need is "Version 8u91.txt" and is as follows ``` Version=8.0.910.14 Name=Java 8 Update 91 FName=jre-8u91-windows ``` The next 2 files needed are "Install-x64.bat" and "install-x86.bat" Install-x64 is as follows: ``` @echo off setlocal ENABLEDELAYEDEXPANSION rem ------------------------------------------------------- rem Here we get the version of the program being installed rem ------------------------------------------------------- set Version= Set Name= Set FName= set Version.File= for /f "skip=5 tokens=4* delims= " %%u in ('dir Version*.txt') do if not defined Version.File set Version.File=%%v for /f "usebackq tokens=1-2 delims==" %%a in ("%Version.File%") Do ( Set %%a=%%b ) rem ------------------------------------------------------- rem Uninstall any old version 1st rem ------------------------------------------------------- for /f "skip=3 tokens=1-2*" %%a in ('powershell "get-wmiobject -class win32_product -filter \"Name like ^'Java _ Update %%^'\" | Where {$_.Version -NotMatch \"%Version%\"} | Select IdentifyingNumber, Version, Name | Format-Table -auto"') do ( MsiExec.exe /X%%a /passive /norestart ) rem ---------------------------------------- rem Program installation process goes here rem ---------------------------------------- %FName%-x64.exe /s ``` Install-x86 is as follows: ``` @echo off setlocal ENABLEDELAYEDEXPANSION rem ------------------------------------------------------- rem Here we get the version of the program being installed rem ------------------------------------------------------- set Version= Set Name= Set FName= set Version.File= for /f "skip=5 tokens=4* delims= " %%u in ('dir Version*.txt') do if not defined Version.File set Version.File=%%v for /f "usebackq tokens=1-2 delims==" %%a in ("%Version.File%") Do ( Set %%a=%%b ) rem ------------------------------------------------------- rem Uninstall any old version 1st rem ------------------------------------------------------- for /f "skip=3 tokens=1-2*" %%a in ('powershell "get-wmiobject -class win32_product -filter \"Name like ^'Java _ Update %%^'\" | Where {$_.Version -NotMatch \"%Version%\"} | Select IdentifyingNumber, Version, Name | Format-Table -auto"') do ( MsiExec.exe /X%%a /passive /norestart ) rem ---------------------------------------- rem Program installation process goes here rem ---------------------------------------- %FName%-i586.exe /s ``` Just create a custom update for each x64 and x86 version and include: for x64 Install-x64.bat jre-8u91-windows-x64.exe Version 8u91.txt for x86 Install-x86.bat jre-8u91-windows-i586.exe Version 8u91.txt
I set the 'Approval' of an update (Java 8 MSI Update) to 'Approval For Uninstallation', which was installed with WSUS before.
On Win7 workstations the uninstallation do work, but on Win10 workstations the update does not appear at all.
Any idea?
Comments: I have created a Custom update to uninstall all old version of java and then install the new version. I test for both 32 & 64 bit OS's The first text file I need is "Version 8u91.txt" and is as follows ``` Version=8.0.910.14 Name=Java 8 Update 91 FName=jre-8u91-windows ``` The next 2 files needed are "Install-x64.bat" and "install-x86.bat" Install-x64 is as follows: ``` @echo off setlocal ENABLEDELAYEDEXPANSION rem ------------------------------------------------------- rem Here we get the version of the program being installed rem ------------------------------------------------------- set Version= Set Name= Set FName= set Version.File= for /f "skip=5 tokens=4* delims= " %%u in ('dir Version*.txt') do if not defined Version.File set Version.File=%%v for /f "usebackq tokens=1-2 delims==" %%a in ("%Version.File%") Do ( Set %%a=%%b ) rem ------------------------------------------------------- rem Uninstall any old version 1st rem ------------------------------------------------------- for /f "skip=3 tokens=1-2*" %%a in ('powershell "get-wmiobject -class win32_product -filter \"Name like ^'Java _ Update %%^'\" | Where {$_.Version -NotMatch \"%Version%\"} | Select IdentifyingNumber, Version, Name | Format-Table -auto"') do ( MsiExec.exe /X%%a /passive /norestart ) rem ---------------------------------------- rem Program installation process goes here rem ---------------------------------------- %FName%-x64.exe /s ``` Install-x86 is as follows: ``` @echo off setlocal ENABLEDELAYEDEXPANSION rem ------------------------------------------------------- rem Here we get the version of the program being installed rem ------------------------------------------------------- set Version= Set Name= Set FName= set Version.File= for /f "skip=5 tokens=4* delims= " %%u in ('dir Version*.txt') do if not defined Version.File set Version.File=%%v for /f "usebackq tokens=1-2 delims==" %%a in ("%Version.File%") Do ( Set %%a=%%b ) rem ------------------------------------------------------- rem Uninstall any old version 1st rem ------------------------------------------------------- for /f "skip=3 tokens=1-2*" %%a in ('powershell "get-wmiobject -class win32_product -filter \"Name like ^'Java _ Update %%^'\" | Where {$_.Version -NotMatch \"%Version%\"} | Select IdentifyingNumber, Version, Name | Format-Table -auto"') do ( MsiExec.exe /X%%a /passive /norestart ) rem ---------------------------------------- rem Program installation process goes here rem ---------------------------------------- %FName%-i586.exe /s ``` Just create a custom update for each x64 and x86 version and include: for x64 Install-x64.bat jre-8u91-windows-x64.exe Version 8u91.txt for x86 Install-x86.bat jre-8u91-windows-i586.exe Version 8u91.txt