Add mod: postSetup - uninstall pc health check
This commit is contained in:
parent
ee27e2951c
commit
292fa8a9eb
@ -0,0 +1,4 @@
|
|||||||
|
@echo off
|
||||||
|
setlocal
|
||||||
|
cd /d "%~dp0"
|
||||||
|
cscript //NoLogo uninstall-pchc.vbs
|
@ -0,0 +1,16 @@
|
|||||||
|
Set updateSearcher = updateSession.CreateUpdateSearcher()
|
||||||
|
Set searchResult = updateSearcher.Search("Type='Software'")
|
||||||
|
|
||||||
|
For I = 0 to searchResult.Updates.Count-1
|
||||||
|
Set update = searchResult.Updates.Item(I)
|
||||||
|
If InStr(1,update.Title,"KB5005463",1) > 0 then
|
||||||
|
If update.IsInstalled <> 0 Then
|
||||||
|
Set collection = CreateObject("Microsoft.Update.UpdateColl")
|
||||||
|
collection.add(update)
|
||||||
|
Set installer = CreateObject("Microsoft.Update.Installer")
|
||||||
|
installer.updates = collection
|
||||||
|
installer.Uninstall
|
||||||
|
End If
|
||||||
|
update.IsHidden = true
|
||||||
|
End If
|
||||||
|
Next
|
@ -0,0 +1,2 @@
|
|||||||
|
opusnt.runReg(["add",opusnt.regTmpPath + "software\\Microsoft\\PCHC","/v","PreviousUninstall","/t","REG_DWORD","/d","0x00000001","/f"])
|
||||||
|
opusnt.runReg(["add",opusnt.regTmpPath + "software\\Microsoft\\PCHealthCheck","/v","installed","/t","REG_DWORD","/d","0x00000001","/f"])
|
Loading…
Reference in New Issue
Block a user