Bug : update always show not installed
This commit is contained in:
parent
f8a21de7f3
commit
4850f846e7
1 changed files with 11 additions and 11 deletions
|
@ -43,9 +43,9 @@ function hide_update() {
|
||||||
Foreach($kbID in $kbIDs){
|
Foreach($kbID in $kbIDs){
|
||||||
$kbNum = $kbID.Replace("KB","")
|
$kbNum = $kbID.Replace("KB","")
|
||||||
Write-Host -NoNewline -ForegroundColor white "Uninstalling $kbID : "
|
Write-Host -NoNewline -ForegroundColor white "Uninstalling $kbID : "
|
||||||
|
if (Get-HotFix -Id $kbID -ErrorAction SilentlyContinue)){
|
||||||
if ($exist){
|
Write-Host -NoNewline -ForegroundColor DarkGreen "found!"
|
||||||
Write-Host -NoNewline -ForegroundColor DarkGreen "found!" -ForegroundColor white "removing ... "
|
Write-Host -Nonewline -ForegroundColor white "removing ... "
|
||||||
wusa.exe /uninstall /KB:$kbNum /norestart /quiet /log:wsua.log
|
wusa.exe /uninstall /KB:$kbNum /norestart /quiet /log:wsua.log
|
||||||
Do
|
Do
|
||||||
{
|
{
|
||||||
|
|
Reference in a new issue