"sfc /scannow" ignore changes?

clqwnless

New Member
Is it possible to remove some paths checking in sfc /scannow? I am deleting some windows defender system files.
However, I want to keep sfc /scannow working. That is, to have sfc /scannow ignore windows defender paths that have been removed.
Is it possible to do this?
 
I thank you for your reply! But I have a different question: is it possible to somehow change the sfc scannow verification algorithm
so that it skips deleted windows defender system paths? Or is it not possible?
 
SFC reads from the C:\Windows\WinSxS component folders and manifests. If you modify or remove system files, follow the basic rules:

- When you replace a file, replace the same file in the last WinSxS folder containing it. Use folder Search.
- When you remove a file, remove the same file from the last WinSxS folder.
- After you apply a Monthly CU update, check if your changes got overwritten and re-apply them.
 
Thank you for your reply! I tried removing sechealthui from systemapps after which i deleted its manifests and its folders in winsxs.
In the end, sfc /scannow still checked the sechealthui path in systemapps
I'll do the same now and send you a report.
 
I just installed windows 17763.1 (1809 first build).

screenshot of the test immediately after installation:

then I changed the rights to the system folder (systemapps\sechealthui) and deleted it. At the same time, I made a backup of it.

I deleted all folders and manifests in winsxs containing sechealthui in their name

screenshot of verification after removal:

CBS log:
 

Attachments

  • before_deleting.PNG
    before_deleting.PNG
    119.4 KB
  • after_deleting.PNG
    after_deleting.PNG
    153.8 KB
  • CBS.log
    959.2 KB
I found a solution to this problem.

In general, as it turned out, it was necessary to delete not only manifests and all directories associated with the deleted system file/folder in winsxs folder,
and also all related directories in the registry along the path: "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\SideBySide\Winners".

If done correctly, sfc /scannow will eventually ignore a specific system file/folder path.

I also forgot to add that in some cases cleaning is also required along the path in the registry: "HKEY_LOCAL_MACHINE\COMPONENTS\DerivedData\Components"

In addition, clearing winsxs paths and manifests associated with a system file/folder is not necessary, since by editing the registry, sfc /scannow will ignore them.
However, you can also clean up winsxs to save space.
 
Last edited:
Back
Top