How to collect missing package files from a running system

Olaf Engelke

Member
Joined
Jan 13, 2024
Posts
22
This is a short guide how I created my own sfcfix.zip file, in this case it was for missing catalog files.

I copied the (for this posting shortened) list into a new file packages.txt

(p) CBS Catalog Missing Package_1436_for_KB5032197~31bf3856ad364e35~amd64~~10.0.1.9
(p) CBS Catalog Missing Package_1441_for_KB5032197~31bf3856ad364e35~amd64~~10.0.1.9
(p) CBS Catalog Missing Package_1442_for_KB5032197~31bf3856ad364e35~amd64~~10.0.1.9

Replaced all characters before package with nothing in Notepad, so the content looked like

Package_1436_for_KB5032197~31bf3856ad364e35~amd64~~10.0.1.9
Package_1441_for_KB5032197~31bf3856ad364e35~amd64~~10.0.1.9
Package_1442_for_KB5032197~31bf3856ad364e35~amd64~~10.0.1.9

This file I put into C:\Skript on the system which still has the files (package name + the extensions .mum and .cat) under C:\Windows\servicing\packages.
I also added a folder Packages to the script folder.
After doing so I executed a PowerShell script with following content:

Code:
$packages = get-content "C:\Skript\packages.txt"
$source = "C:\Windows\servicing\Packages"
$target = "C:\Skript\Packages\"
foreach ($package in $packages) {
$files = gci $source\$package.*
Copy-Item $files $target
}

This copied the relevant files into the folder C:\Skript\Packages.

I zipped the entire folder, verified, that Packages is a subfolder in the zip file and added the SFCFix.txt from one of the examples pointing to packages folder to the root of the zip file. (There are various incarnations, the correct target selection in the file will depend from which components are faulty.)

Downloaded the exe file, copied it together with the self created zip file to the desktop of the faulty server and followed the instructions given in the other topics (drag & drop).

Worked well, dism at least was happy afterwards.

Best greetings from Germany
Olaf
 
Hi and welcome to Sysnative,

See also this tutorial how to troubleshoot common issues with replacement files and how to source them. When you're looking for *.cat/mum pairs you'll need to bear in mind that the Windows Search engine can't handle the console sign ~ in filenames, so you need to shorten the name of the package. For example the highlighted part below.

Rich (BB code):
Package_1436_for_KB5032197~31bf3856ad364e35~amd64~~10.0.1.9

If you use the full filename - with or without the extension *.cat/mum, Explorer.exe finds nothing. So there are two options to search for those files, shorten the filename or use a tool like Everything.

VM-Example.png
 
Thats why I almost always prefer to use the command line if I search something:
dir something.* /s /a

It is usually faster and more reliable than the Explorer search in my opinion.

Best greetings from Germany
Olaf
 

Has Sysnative Forums helped you? Please consider donating to help us support the site!

Back
Top