Error code 0x80073701 translates to ERROR_SXS_ASSEMBLY_MISSING. This is sometimes encountered in Windows when you attempt to add a role or feature and Windows registry considers a specific package to be installed, yet the manifest is not present on the system. Here is how you can fix it.
- Open the file C:\Windows\Logs\CBS\CBS.log (or CbsPersist_<date>.log)
- Find the error code: 0x80073701
- If you find a line with error code 0x80073701, note the name of the file.
- Run PowerShell as Administrator.
- Run ERROR_SXS_ASSEMBLY_MISSING.ps1
- Enter the full path to log file noted above. If the log in question is the default CBS.log file, you can leave it blank. Press Enter.
- If all works well, it should verify one or more packages’ state and say “Verification passed, Retry Enabled”.
- Retry the role/feature installation again.
Example script usage:
PS C:> C:\temp\ERROR_ASSEMBLY_MISSING.ps1 Transcript started, output file is C:\Windows\system32\AssemblyMissingScript-20231004-1323-35.log Please enter CBS file path (Default Path: c:\windows\logs\cbs\cbs.log): C:\Windows\Logs\CBS\CbsPersist_20231004033718.log C:\Windows\Logs\CBS\CbsPersist_20231004033718.log Checking resolving packages Found following resolving packages True Mark this package absent Package_3817_for_KB4601383~31bf3856ad364e35~amd6410.0.1.7 True Mark this package absent Package_3819_for_KB4601383~31bf3856ad364e35~amd6410.0.1.7 Verifying package state 0 of Package_3817_for_KB4601383~31bf3856ad364e35~amd64~~10.0.1.7 0 of Package_3819_for_KB4601383~31bf3856ad364e35~amd64~~10.0.1.7 ========================================================================= Verification passed, Retry Enabled ========================================================================= Transcript scopped, output file is C:\Windows\system32\AssemblyMissingScript-20231004-1323-35.log Press Enter to continue…:
As I understand it, the script performs the following steps:
- Examines the CBS.log file that is passed to it:
- Verifies the log file contains a line with the text: ERROR_SXS_ASSEMBLY_MISSING
- Collects the lines from the log that contain the text: Resolving Package:
- Using the lines collected, extracts the full package name(s), such as: Package_3819_for_KB4601383~31bf3856ad364e35~amd64~~10.0.1.7
- This is done by taking each line into a variable $packageLine, and then running this to split and select the package name and assign it to an array: $packageLine.Split(“:”).Trim().Split(‘,’).Trim() | Select-String “Package_”
- Updates the registry as follows:
- Looks at the following key: HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages
- Connects to the subkey matching the name of the package(s) identified in step 1c, and performs the following:
- Takes ownership of the subkey.
- Updates the subkey ACL to add FullControl permissions.
- Sets the subkey value named CurrentState to DWORD data: 0
- Verifies the registry changes in step 2 were completed.
Note: Script is linked below. Use at your own risk. No support or warranty is provided by me.