Here’s an interesting item. As part of routine maintenance, I ran DISM /online /cleanup-image /analyzecomponentstore on the P16 Mobile Workstation this morning. Imagine my surprise when it threw “Error 2; The system cannot find the file specified.” at about 80% complete. I’d never run across this one before. But a Google Search soon revealed that this happens when DISM encounters a corrupted entry in the component store. MS Answers also reported that, nearly always, chkdsk /f fixes DISM issues of this kind. So that’s what I tried: as you can see from the lead-in graphic, it worked!
How Chkdsk /f Fixes DISM Issues
This particular disk scanning operation repairs any corrupted files it finds, if it can. That has me wondering if sfc /scannow might not have had the same salutary effect. I think that’s at least possible, so I’ll have to try it next time around. The only follow-on is that repairs to the C: drive (especially for the kinds of files that DISM cares about) must run while the Windows OS image is not in use. That means scheduling that check and repair during boot-up before the OS takes over operation of the PC (that is, while the boot loader is running things).
Thus, I had to reboot the P16, and watch the check run as a pre-boot task (large white text against a black screen). Here’s a capture from inside a Hyper-V VM (otherwise, it’s challenging to grab boot-time screens from Windows).
Once that repair had completed, I was able to run the previously inoperative DISM command without trouble. Every now and then, one gets lucky in Windows-World. This time, the repair worked just like it was supposed to. Good stuff!