My task was to uninstall specific KBs for Office products. I noticed the normal wusa.exe was not working, so I had to come up with another way to remove patches. The “package” info can be found in the registry, under the Uninstall key.
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall
or
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall
rem Uninstalls specific KBs for Office Products
rem 2007
if exist “c:\Program Files\Microsoft Office\Office12\Excel.exe” (
Echo 2007
wusa /uninstall /kb:2984942 /quiet /norestart
Msiexec /package {90120000-0030-0000-0000-0000000FF1CE} /uninstall {FB9CFB27-DB51-440C-9225-F958A24555A9} /qn
)
if exist “c:\Program Files (x86)\Microsoft Office\Office12\Excel.exe” (
Echo 2007
wusa /uninstall /kb:2984942 /quiet /norestart
Msiexec /package {90120000-0030-0000-0000-0000000FF1CE} /uninstall {FB9CFB27-DB51-440C-9225-F958A24555A9} /qn
)
rem 2010
if exist “c:\Program Files\Microsoft Office\Office14\Excel.exe” (
Echo 2010
wusa /uninstall /kb:2910902 /quiet /norestart
Msiexec /package {90140000-0011-0000-0000-0000000FF1CE} /uninstall {6A1E6C95-CDE5-4E8C-A712-79C0985DAFE6} /qn
)
if exist “c:\Program Files (x86)\Microsoft Office\Office14\Excel.exe” (
Echo 2010
wusa /uninstall /kb:2910902 /quiet /norestart
Msiexec /package {90140000-0011-0000-0000-0000000FF1CE} /uninstall {6A1E6C95-CDE5-4E8C-A712-79C0985DAFE6} /qn
)
rem 2013
if exist “c:\Program Files\Microsoft Office\Office15\Excel.exe” (
Echo 2013
wusa /uninstall /kb:2910929 /quiet /norestart
Msiexec /package {90150000-0011-0000-1000-0000000FF1CE} /uninstall {5410DCA4-C8FD-4390-BFE9-8D683156803D} /qn
)
if exist “c:\Program Files (x86)\Microsoft Office\Office15\Excel.exe” (
Echo 2013
wusa /uninstall /kb:2910929 /quiet /norestart
Msiexec /package {90150000-0011-0000-1000-0000000FF1CE} /uninstall {5410DCA4-C8FD-4390-BFE9-8D683156803D} /qn
)
Not Used
rem msiexec /x {90140000-0011-0000-0000-0000000FF1CE} MSIPATCHREMOVE={6A1E6C95-CDE5-4E8C-A712-79C0985DAFE6}
rem HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{90140000-0011-0000-0000-0000000FF1CE}_Office14.PROPLUS_{6A1E6C95-CDE5-4E8C-A712-79C0985DAFE6}
rem HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Products\00004109110000000000000000F01FEC\Patches\59C6E1A65EDCC8E47A21970C89D5FA6E
rem wmic product where name=’Security Update for Microsoft Excel 2010 (KB2910902) 32-Bit Edition’ call uninstall
rem wmic product where “name like ‘Security Update for Microsoft Excel 2010 (KB2910902) 32-Bit Edition'” call uninstall