Showing posts with label dism. Show all posts
Showing posts with label dism. Show all posts

Tuesday, September 19, 2023

DISM From USB Windows Installer

If your windows pc wont boot, I will show you some command we can use from Windows Recovery to try and fix and repair Windows 11 or Windows 10

dism command using your windows image
dism /image:c:\ /cleanup-image /restorehealth /source:c:\windows

Add this command you yours and change path to your path
/scratchdir:{path}

This command uses the windows image on USB drive we created.
dism /image:c:\ /cleanup-image /restorehealth /source:{path to install.wim or install.esd}

sfc /scannow from windows recovery
sfc /scannow /offbootdir={drive}\ /offwindir={drive}\windows

Important: Make sure you change drive letters to your drive letters 

The above is somewhat cryptic. This Youtube video may help.
or this one

Saturday, April 29, 2023

DISM Horror Show

 The dreaded "can't find source" error. Good Luck. Downloading the windows.iso and using the sources switch did not work for me. Using Media Creation Tool to "upgrade" did work.
*It's wise to have stuff backed up.

First I tried this . . .

Download win install ISO
To read index of versions in Windows.iso
Mount the ISO then cmd as admin:
dism /Get-WimInfo /WimFile:[drive_letter]:\sources\install.esd

To read more info about each version:
dism /Get-WimInfo /WimFile:[drive_letter]:\sources\install.esd /index:1 (or whatever)

If you want to export the wim version to match (change "IndexNumber")
dism /export-image /SourceImageFile:install.esd /SourceIndex:IndexNumber /DestinationImageFile:install.wim /Compress:max /CheckIntegrity
*This saves some room but not worth the trouble

DISM /Online /Cleanup-Image /StartComponentCleanup

DISM /Online /Cleanup-Image /AnalyzeComponentStore

DISM /Online /Cleanup-Image /RestoreHealth /Source:WIM:c:\install.wim:1 /LimitAccess
or
DISM /Online /Cleanup-Image /RestoreHealth /Source:e:\sources\install.esd /LimitAccess

Yes, I tried without /LimitAccess.

This is what I kept getting . . . And sfc /scannow would find errors it could not fix

(On one PC I get this error and can't get any fix to work.
Error: 0x800f081f

The source files could not be found.
Use the "Source" option to specify the location of the files that are required to restore the feature. For more information on specifying a source location, see https://go.microsoft.com/fwlink/?LinkId=243077.)

So I did an "upgrade" with the Media Creation Tool which didn't really upgrade anything but did seem to reinstall the system and kept my installed programs with few alterations to the basic system. This is not a "reset" which will remove your installed programs. It seems Windows always has a way to install repair over the current version. Yes, sfc /scannow now gave a clean report.

(C:\WINDOWS\system32>DISM /Online /Cleanup-Image /RestoreHealth

Deployment Image Servicing and Management tool
Version: 10.0.19041.844

Image Version: 10.0.19045.2846

[==========================100.0%==========================] The restore operation completed successfully.
The operation completed successfully.)

BitLocker

BitLocker: How to Protect Yourself Even If You Don’t Use It Many Windows users (including me) run local accounts and never intentionally ...