Share via


dism /Online /NoRestart /Cleanup-Image /StartComponentCleanup and other dism commands

Question

Wednesday, August 2, 2017 3:44 AM

How do these two commands compare:

1) dism /online /cleanup-image /restorehealth

2) dism /Online /NoRestart /Cleanup-Image /RestoreHealth

3) DISM.exe /Online /Cleanup-Image /RestoreHealth /Source:L:\Windows /LimitAccess

When should each of them fail?

When should each of them be successful?

Should they have the same outcome?

What does this command do:  dism /Online /NoRestart /Cleanup-Image /StartComponentCleanup

When should it be ran?

When is it expected to fail?

What does this command do:  DISM.exe /Online /Cleanup-Image /RestoreHealth /Source:L:\Windows /LimitAccess

Do all of these command work in administrative command prompt?

How come one has the .exe?

What is the advantage and disadvantage of the .exe commands compared to the non .exe commands?

All replies (3)

Thursday, August 3, 2017 9:25 AM

Hi,

In fact, these two three command is a few slightly differences.

their output are the same as below:

Compare to dism /Online /Cleanup-Image /RestoreHealth,  /NoRestart parameter only suppresses reboot. If a reboot is not required, this command does nothing. This option will keep the application from prompting for a restart (or keep it from restarting automatically if the /Quiet option is used).

 /Source with /RestoreHealth is used to specify the location of an install.wim file as the source of known good versions of files that can be used for the repair. The install.wim file will be in the Sources folder of a mounted Windows 10 ISO file.

And yes, all of these commands need administrator privilege to run.

If your system file is corrupted or missing, these command will prompt you some different information.

Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact [email protected].


Thursday, August 3, 2017 10:32 AM

What is the purpose of the cleanup image command?

When does this command need to be run?

What does it do that the restorehealth command does not do?

If dism /online /cleanup-image /restorehealth does not complete and displays one of many error codes what is the pro and con of each of these methods other than time:

1) create a bootable windows 10 iso

2) open administrative command prompt

3) open file explorer

4) insert the windows 10 iso into any usb drive

5) view file explorer to determine the letter of the windows 10 iso drive

6) open administrative command prompt and type:  DISM.exe /Online /Cleanup-Image /RestoreHealth /Source:L:\Windows /LimitAccess

7) change the letter L to the letter of the drive see in file explorer for the windows 10 iso drive

8) run the command

versus

1) opening file explorer

2) inserting the windows 10 iso into any usb ort

3) identifying the windows 10 iso within file explorer

4) clicking on windows 10 iso within file explorer and launching setup or setup.exe

5) perform an in place upgrade repair with the windows 10 iso

Which one is better and why?

Which one is worse and why?

Other than time why choose one over the other?

Also a totally separate question.  If you use windows recovery and compare reset with remove files to clean install (delete partitions, format drive, make unallocated drive) 

which one of the above is better and why?

which one of the above is worse and why?

Other than time why choose one over the other?

And finally how does an in place upgrade repair compare to a reset with save files?  is the only difference the loss of applications or are there other differences in the result?


Friday, August 4, 2017 9:20 AM | 1 vote

Read this:

/en-us/windows-hardware/manufacture/desktop/what-is-dism

Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact [email protected].