SCCM & OSD

Uninstall Microsoft Software Update deployed with SCCM

I recently had to uninstall a Software Update deployed by SCCM 2012 on a Windows 10 client. Before when running SCCM 2007 i used to run WUSA with the following syntax:

wusa.exe / uninstall / kb: <KBnumber> /quiet /norestart

This didnt work  with the /quiet parameter so instead i had to use DISM as i need to be able to uninstall it silently.

DISM takes the packageName of the Software Update as input which can be found by running the following command on a client which have the Software Update installed:

dism /online /get-packages /format:table

Deployment Image Servicing and Management tool
Version: 10.0.10586.0

Image Version: 10.0.10586.0

Packages listing:


--------------------------------------------------------------------------------------------------------- | --------------- | --------------- | ----------------
Package Identity                                                                                          | State           | Release Type    | Install Time    
--------------------------------------------------------------------------------------------------------- | --------------- | --------------- | ----------------
Microsoft-Windows-Client-LanguagePack-Package~31bf3856ad364e35~amd64~da-DK~10.0.10586.0                   | Installed       | Language Pack   | 13-02-2016 16:58
Microsoft-Windows-DiagTrack-Internal-Package~31bf3856ad364e35~amd64~~10.0.10586.0                         | Installed       | Feature Pack    | 30-10-2015 07:26
Microsoft-Windows-Foundation-Package~31bf3856ad364e35~amd64~~10.0.10586.0                                 | Installed       | Foundation      | 30-10-2015 07:26
Microsoft-Windows-InsiderHub-Package~31bf3856ad364e35~amd64~~10.0.10586.0                                 | Installed       | OnDemand Pack   | 13-02-2016 17:02
Microsoft-Windows-LanguageFeatures-Basic-da-dk-Package~31bf3856ad364e35~amd64~~10.0.10586.0               | Installed       | OnDemand Pack   | 13-02-2016 17:02
Microsoft-Windows-LanguageFeatures-Basic-en-us-Package~31bf3856ad364e35~amd64~~10.0.10586.0               | Installed       | OnDemand Pack   | 13-02-2016 17:02
Microsoft-Windows-LanguageFeatures-Handwriting-da-dk-Package~31bf3856ad364e35~amd64~~10.0.10586.0         | Installed       | OnDemand Pack   | 13-02-2016 17:02
Microsoft-Windows-LanguageFeatures-OCR-da-dk-Package~31bf3856ad364e35~amd64~~10.0.10586.0                 | Installed       | OnDemand Pack   | 13-02-2016 17:02
Microsoft-Windows-LanguageFeatures-OCR-en-us-Package~31bf3856ad364e35~amd64~~10.0.10586.0                 | Installed       | OnDemand Pack   | 13-02-2016 17:02
Microsoft-Windows-NetFx3-OnDemand-Package~31bf3856ad364e35~amd64~~10.0.10586.0                            | Installed       | OnDemand Pack   | 11-04-2016 14:54
Microsoft-Windows-Prerelease-Client-Package~31bf3856ad364e35~amd64~da-DK~10.0.10586.0                     | Installed       | Language Pack   | 13-02-2016 16:58
Microsoft-Windows-Prerelease-Client-Package~31bf3856ad364e35~amd64~~10.0.10586.0                          | Installed       | Feature Pack    | 30-10-2015 07:26
Microsoft-Windows-Security-SPP-Component-SKU-Enterprise-GVLK-Package~31bf3856ad364e35~amd64~~10.0.10586.0 | Installed       | Feature Pack    | 13-02-2016 17:20
Package_for_KB3135173~31bf3856ad364e35~amd64~~10.0.1.2                                                    | Installed       | Security Update | 13-02-2016 17:13
Package_for_KB3136561~31bf3856ad364e35~amd64~~10.0.1.0                                                    | Installed       | Update          | 13-02-2016 17:13
Package_for_KB3140741~31bf3856ad364e35~amd64~~10.0.1.0                                                    | Installed       | Update          | 11-04-2016 14:35
Package_for_KB3144756~31bf3856ad364e35~amd64~~10.0.1.0                                                    | Installed       | Security Update | 11-04-2016 14:35
Package_for_KB3149135~31bf3856ad364e35~amd64~~10.0.1.1                                                    | Installed       | Update          | 24-06-2016 15:03
Package_for_KB3154132~31bf3856ad364e35~amd64~~10.0.1.0                                                    | Installed       | Security Update | 24-06-2016 10:01
Package_for_KB3157993~31bf3856ad364e35~amd64~~10.0.1.0                                                    | Installed       | Security Update | 24-06-2016 09:49
Package_for_RollupFix~31bf3856ad364e35~amd64~~10586.218.1.4                                               | Superseded      | Security Update |                 
Package_for_RollupFix~31bf3856ad364e35~amd64~~10586.318.1.7                                               | Install Pending | Security Update | 28-06-2016 12:39

The operation completed successfully.

From the list find the Package Identity Name of the Software Update.

Run this command to uninstall the KB3144756 silently:

DISM.exe /Online /Remove-Package /PackageName:Package_for_KB3144756~31bf3856ad364e35~amd64~~10.0.1.0 /quiet /norestart

It might require a reboot for the update to be fully removed.

Edit Registry on a mounted WIM

This guide assumes that ImageX is avaliable on your computer. (Avaliable via Windows Automated Installation Kit (WAIK).

Mount the WIM file

Mount the WIM file to a local folder using ImageX. C:\ImageX>imagex /mountrw install.wim 1 c:\mount

Load the registry hive

Load the registry hive you need. In this case let’s mount HKLM\Software.

C:\mount reg load HKLM\test c:\mount\windows\system32\config\software

Open Regedit to make changes or use Reg Add from the command line.

Unload the reg hive

C:\Windows\system32 reg unload HKLM\test

Unmount the image

C:\ImageX>imagex /unmount /commit c:\mount

Capture image using ImageX

When doing the capture you should have booted into WinPE. You can place the wim file on a remote file share aswell as locally. To use a remote file share map it as a network drive when booted into WinPE.

imagex /capture c: t:\my-windows-partition.wim “My Windows partition”

The following commandline parameters can be added to the above

/compress [maximum | fast | none] : Specifies the type of compression used for the initial capture operation

/check : Checks the integrity of the .wim file. If not provided, existing checks are removed.

For full documentation see: http://technet.microsoft.com/en-us/library/cc749447(WS.10).aspx

Update WinPE Boot image driver

When adding a driver to WinPE make sure that you choose Windows Vista drivers since WinPE is based on Windows Vista.

Intels WinPE/Windows Vista drivers are found in the PRO1000\Win32\NDIS61 folder after having extracted the drivers from ie. PROWin32.exe downloaded from Intel

For bonus info the extract command on the PROWin32.exe is /f “destination”.