.Net patching error: failed to resolve source

According to Google, the canned Microsoft response for “SOURCEMGMT: Failed to resolve source” errors when patching .Net is to use the .Net Cleanup Tool, completely remove .Net, and reinstall. Don’t feel like doing that to Production machines. How about let’s just fix the problem?

patch failure

patch failure

.Net 3.5 install fails on the sub-problems with .Net 2.0.

To repair the .Net 2.0 Service Pack 1 install on this machine, we run:

msiexec /i {B508B3F1-A24A-32C0-B310-85786919EF28} REBOOT=ReallySuppress /l*v %temp%\netfx20sp1_repair_log.txt /qn

Which fails:

MSI (s) (6C:1C) [02:48:12:122]: Original package ==> F:\Installs\dotnetfix\20sp1\wcu\dotNetFramework\dotNetFX20\Netfx20a_x86.msi
MSI (s) (6C:1C) [02:48:12:122]: Package we're running from ==> C:\WINDOWS\Installer\110c470.msi
MSI (s) (6C:1C) [02:48:12:137]: APPCOMPAT: looking for appcompat database entry with ProductCode '{B508B3F1-A24A-32C0-B310-85786919EF28}'.
MSI (s) (6C:1C) [02:48:12:137]: APPCOMPAT: no matching ProductCode found in database.
MSI (s) (6C:1C) [02:48:12:137]: Note: 1: 2262 2: File 3: -2147287038
MSI (s) (6C:1C) [02:48:12:137]: Note: 1: 2262 2: MsiFileHash 3: -2147287038
MSI (s) (6C:1C) [02:48:12:137]: Couldn't find local patch ''. Looking for it at its source.
MSI (s) (6C:1C) [02:48:12:137]: Resolving Patch source.
MSI (s) (6C:1C) [02:48:12:137]: User policy value 'SearchOrder' is 'nmu'
MSI (s) (6C:1C) [02:48:12:137]: SOURCEMGMT: Media enabled only if package is safe.
MSI (s) (6C:1C) [02:48:12:137]: SOURCEMGMT: Looking for sourcelist for product {125F0ACC-D3FC-402B-8D96-27F6E46D00D5}
MSI (s) (6C:1C) [02:48:12:137]: Note: 1: 1706 2: {125F0ACC-D3FC-402B-8D96-27F6E46D00D5} 3:
MSI (s) (6C:1C) [02:48:12:137]: SOURCEMGMT: Failed to resolve source
MSI (s) (6C:1C) [02:48:12:137]: Searching provided command line patches for patch code {125F0ACC-D3FC-402B-8D96-27F6E46D00D5}
MSI (s) (6C:1C) [02:48:12:137]: Note: 1: 1708
MSI (s) (6C:1C) [02:48:12:137]: Product: Microsoft .NET Framework 2.0 Service Pack 1 -- Installation failed.
MSI (s) (6C:1C) [02:48:12:137]: Windows Installer installed the product. Product Name: Microsoft .NET Framework 2.0 Service Pack 1. Product Version: 2.1.21022. Product Language: 0. Installation success or error status: 1612.
MSI (s) (6C:1C) [02:48:12:137]: MainEngineThread is returning 1612

So, fire up procmon, and see what’s happening.

procmon

It’s missing registry keys that point it to the install patch locations. Just compare it to a known-good install with the same version having issues (.Net 2.0 SP1).

compare registries

So, we can see that THEGOODSERVER has the registry keys for the .Net MSP’s that aren’t present on THEBADSERVER (e.g., “PreXP.msp”):

We have extracted the install source (and patch .MSP’s) to: F:120

Export the registry keys from the known-good server, import to the bad, and update the file locations in the registry keys (F:.....).

Keep iterating through a repair while we watch procmon and see the installer patch locations that are never found:

keys not found

keys not found

Move on to the next source file....

MSI (s) (B0:B4) [03:19:58:398]: Couldn't find local patch ''. Looking for it at its source.
MSI (s) (B0:B4) [03:19:58:398]: Resolving Patch source.
MSI (s) (B0:B4) [03:19:58:398]: User policy value 'SearchOrder' is 'nmu'
MSI (s) (B0:B4) [03:19:58:398]: SOURCEMGMT: Media enabled only if package is safe.
MSI (s) (B0:B4) [03:19:58:398]: SOURCEMGMT: Looking for sourcelist for product {558CD0A7-0548-4220-88FE-01CC1477DF61}
MSI (s) (B0:B4) [03:19:58:398]: Note: 1: 1706 2: {558CD0A7-0548-4220-88FE-01CC1477DF61} 3:
MSI (s) (B0:B4) [03:19:58:398]: SOURCEMGMT: Failed to resolve source
more keys not found

more keys not found

Repeat until all the missing registry entries have been updated.

grab them all

grab them all

And, Bam!

I love the smell of success in the morning

I love the smell of success in the morning