New
#21
If you have to ask the user to manually copy the log file onto the desktop, the copying can be done automatically by adding an option into the following script:
SFCfromFile.bat
However, Ztruker has said "NO NO NO".
The current options for CBS:
1) manual collection > manual share link
2) run command to create txt on desktop > manual share link
3) run PS1 or LOGS
Consider the following option for unknown size CBS:
a) command to change: C:\Windows\Logs\CBS\CBS.log > C:\Windows\Logs\CBS\CBS.log.old (with date)
b) run command that will generate findings in a new CBS.log
c) collect the new C:\Windows\Logs\CBS\CBS.log
Maybe find a suitable maximal size.
Then create a script to:
a) find the size
b) if < the max size > collect
c) if > the max size > change C:\Windows\Logs\CBS\CBS.log > C:\Windows\Logs\CBS\CBS.log.old (with date)
d) report results
Can then run tuneup.bat to create a new CBS.log
Please consider a similar command to collect: C:\windows\memory.dmp
a) run command to find size
b) if < 1.5 GB > collect
c) if > 1.5 GB > report
V2 has memory-dumps.txt
Code:LastWriteTime Size (MB) FullName ------------- --------- -------- 2020-10-18 12:27:36 PM 2841.25 C:\Windows\MEMORY.DMP
Testing.bat
The above script will ...
1. Copy CBS.log onto the desktop if the size is less than or equal to 5 MB.
2. If it is larger than 5 MB, CBS.log will be renamed CBS.bak_Date_at_Time.log, andsfc /scannow
will be run so as to create a new "CBS.log" file, which will then be copied onto the desktop.
How should the results be reported? Use Notepad to open "CBS.log" or copy all "[SR]" lines into a new file?
Last edited by Matthew Wai; 19 Oct 2020 at 08:02.
For tuneup.bat there are two runs of scannow.
Assume a 5 MB cutoff.
This could happen:
The first scannow may report integrity problems that it fixed
or it may report integrity problems that it could not fix.
Restoreheath fixes the underlying problems.
The second scannow reports no integrity violations.
If these are fixed by restore health the cause of the failure will not appear in the collected CBS log.
(The command would have changed the CBS to bak)
So consider a higher cutoff. 10 or 15 MB?
The CBS and DISM folders are collected by PS1 / LOGS.
What method could be used so that the bat file is similar?
In this link:
1909 Bootable - 2004 Not Bootable (USB)
OP had problems posting tuneup.bat results using code.
And OP had problems with Kaspersky AV.
This script was made for servers:
https://gallery.technet.microsoft.co...Query-bdb79542
Anything relatively easy to modify to use for Windows 10?
This was made for windows 10 but did not display results:
https://gallery.technet.microsoft.co...eboot-a7099496
If %Size% LEQ 5242880
5242880 = 5 MB
10485760 = 10 MB
15728640 = 15 MB
Feel free to change the number as you please.
Are you referring to V2 Log collector? I cannot find CBS and DISM folders in the ZIP file created on the desktop.