Brink,
I've been reviewing my use of SFC and noticed that Option 5 states that elevated commands are needed to extract results. That is no longer the case. Normal command prompts & normal shortcuts can be used to extract results.
I've amended my post #199 Run SFC using shortcuts to reflect this change.
I do not know when the change happened. Perhaps Windows 10 has never needed elevation to extract results but I kept doing it because I had to in Windows 7?
I don't know if you are interested in listing variations of results' extractions - extracting all, extracting repairs, extracting failures to repair, extracting failures to "reproject".
I find that reducing the amount of data in each individual file makes the job easier.
Here are the ones I use -
Intro
You can use findstr commands to extract just the entries in the CBS log that you want.
- You never need to look through the entire log.
- SFC writes to the CBS log and its entries contain [SR]
- Other Windows functions, such as Windows installer, also write to the CBS log but these other entries do not contain [SR].
- Windows does archive the CBS log when it sees fit so you should extract results when you find an SFC problem and not leave it for a rainy day. If you do leave it too long, you might find the data you want in the archive files in %windir%\Logs\CBS [they are called cbsPersist...log] but these are not kept forever either.
Extraction 1 - Extract all SFC results [the one you currently provide in Option 5]
- Choose your own path & filename. I include the computer name because I use the same shortcuts on several computers but you can omit that if it is not useful for you
Code:
findstr.exe /c:"[SR]" %windir%\Logs\CBS\CBS.log >D:\Desktop\%ComputerName%-SFCResults.Log
.
Extraction 2 - Extract list of items that SFC repaired successfully
- Choose your own path & filename. I include the computer name because I use the same shortcuts on several computers but you can omit that if it is not useful for you.
Code:
findstr.exe /c:"[SR] Repair" %windir%\Logs\CBS\CBS.log >D:\Desktop\%ComputerName%-SFCResults-Repairs.Log
- The Repairs.Log normally has 2 apparently spurious entries when no repairs were needed -
2020-03-04 16:31:13, Info CSI 00000245 [SR] Repairing 0 components
2020-03-04 16:31:13, Info CSI 00000247 [SR] Repair complete
Extraction 3 - Extract list of items that SFC could not repair
- Choose your own path & filename. I include the computer name because I use the same shortcuts on several computers but you can omit that if it is not useful for you.
Code:
findstr.exe /c:"[SR] Cannot repair member file" %windir%\Logs\CBS\CBS.log >D:\Desktop\%ComputerName%-SFCResults-Unrepairables.Log"
Extraction 4 - Extract list of items that SFC "could not reproject"
- I have never found a decent explanation of this type of failure but, because each entry includes "source file in store is also corrupted", I believe that it can serve as an explanation for a corresponding entry in the irrepairables list.
- Choose your own path & filename. I include the computer name because I use the same shortcuts on several computers but you can omit that if it is not useful for you.
Code:
findstr.exe /c:"[SR] Could not reproject" %windir%\Logs\CBS\CBS.log >D:\Desktop\%ComputerName%-SFCResults-CouldNotReproject.Log
Denis