I saved this script as: MSP (Office.msp Superseded Patches Uninstaller).vbs then Double Click it, and it works very well... I use this script each month after I install the WHDownloader updates for Office 2010..
From admin cmd, yes. Nothing. No outputs or errors. I uninstalled all my sec programs, nothing. File location: D:\Dektop\office.vbs Tried double click on it and from admin cmd. Windows 8.1 x64 I manually deleted a long time ago lots of Office folders within C:\Windows\Installer\$PatchCache$ Damn!
What is actually not working? Even if you deleted the relevant folders, it should still execute and come up with something. It is not only Office, but anything based on msi, like Adobe Reader and its updates, although it normally would not clean anything unless editing the registry (or by using the -force flag which I avoid, but is there), but would still come up with a message. I even used this script with product like MS SQL Server and its patches and Service Packs and works perfectly.
I understand is not only Office but any msi stuff. When I double click on the vbs file or execute from admin cmd, nothing happens. Not a single msg box or anything showing a process has started...
@Mr.X You probably don't have any installed MSI patches (msp files) i just tested the script (i don't have any patches), and i got no output too you can remove ' from this line to get list of installed products Code: 'Wscript.Echo productU & "\" & productN
Run from command prompt i don't see any msp files, all are folders anyway, maybe your registry is corrupted check or export this key: Code: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Products
It is my turn now to say that your line of code is not working (with' or without) . On what Operating System is this running? I am on Win10 - 1909. EDIT: Sorry @abbodi1406 I misinterpreted your post. @Mr.X clarified it for me.
That line is part of the original code (see first post). Just remove the ' from that specific line found in the original code to get list of installed products. Well, I understood in that manner. Anyway the code does not work for me.
It appears to be running. I used to run Patch Cleaner before discovering the script here. I can only think that there is a problem with your scripting engine, but I cannot assist further other than saying to try reinstalling OS in upgrade mode.
Dism++ remove superseded msp patches. I am the author of Dism++'s Windows Installer Cleanup Item. But I remove the file and registry of the superseded msp patches directly instead of using Windows Installer API to remove the superseded msp patches. Because it's superseded. Many MSP patches don't supersede the old one. For example, Microsoft Office. Or uninstalled automatically before installing the new one. For example, Visual Studio 2012/2013/2015. So it can't clean up a lot. But I have found a better way to save space.(I can streamline the msp file itself and make installing other updates and uninstall the app. But I can't promise it's OK when add the component for the app.) But that method haven't been verified a lot. P.S. Also, I have analysed the PatchCleaner from HomeDev. It does the same thing as my implementation in Dism++. Kenji Mouri