while running this command as admin. uninstall kb is not happening, logging in eventID 8.
wusa /uninstall /kb:5032007
/quiet /norestart
i have windows 11 with AMD64 machine.
if run without quiet and noreatart patch uninstallation will work.
i want to include this in python script. however uninstallation of kb number not working with /quiet /norestart.
if somebody helps, that would be gratefull.
i tried all possible way. but wusa not working
import subprocess
kb_number = "5032007"
command = f"wusa /uninstall /kb:{kb_number} /quiet /norestart"
try:
result = subprocess.run(command, check=True, shell=True)
print("Update uninstalled successfully.")
except subprocess.CalledProcessError as e:
print(f"Error: {e}")
I would like to run wusa command in subprocess. And while uninstalling i would like to capture system event logs for the special task added in event.
A powershell alternative can be:
Or with WU API (powershell example):
Note: a single update package can have multiple KBs, and multiple packages can reference the same KB