Post problem reports here for Batch files for use in BSOD debugging  

Page 3 of 150 FirstFirst 123451353103 ... LastLast

  1. Posts : 14,004
    Windows 10 Pro X64 21H1 19043.1503
    Thread Starter
       #21

    Matthew Wai said:
    Why not add the command into the batch script?

    NO NO NO


    File can be 50K in size. No reason to collect it. That's what the batch script is for, to suck out the info needed.
      My Computers


  2. Posts : 7,572
    Windows 10 Home 20H2
       #22

    zbook said:
    Which script?

    Did you want it on the desktop?
    Or automatically collected?
    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".
      My Computer


  3. Posts : 40,424
    windows 10 professional version 1607 build 14393.969 64 bit
       #23

    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
      My Computer


  4. Posts : 7,572
    Windows 10 Home 20H2
       #24

    zbook said:
    unknown size CBS:
    The size can be found by:

    For %%# in ("%WinDir%\Logs\CBS\CBS.log") Do (Set 【Size】=%%~z#)
      My Computer


  5. Posts : 40,424
    windows 10 professional version 1607 build 14393.969 64 bit
       #25

    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
      My Computer


  6. Posts : 7,572
    Windows 10 Home 20H2
       #26

    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, and sfc /scannow will be run so as to create a new "CBS.log" file, which will then be copied onto the desktop.

    zbook said:
    d) report results
    How should the results be reported? Use Notepad to open "CBS.log" or copy all "[SR]" lines into a new file?
    Post problem reports here for Batch files for use in BSOD debugging Attached Files
    Last edited by Matthew Wai; 19 Oct 2020 at 08:02.
      My Computer


  7. Posts : 40,424
    windows 10 professional version 1607 build 14393.969 64 bit
       #27

    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?
      My Computer


  8. Posts : 40,424
    windows 10 professional version 1607 build 14393.969 64 bit
       #28

    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.
      My Computer


  9. Posts : 40,424
    windows 10 professional version 1607 build 14393.969 64 bit
       #29

    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
      My Computer


  10. Posts : 7,572
    Windows 10 Home 20H2
       #30

    zbook said:
    So consider a higher cutoff. 10 or 15 MB?
    If %Size% LEQ 5242880

    5242880 = 5 MB
    10485760 = 10 MB
    15728640 = 15 MB

    Feel free to change the number as you please.

    zbook said:
    The CBS and DISM folders are collected by PS1 / LOGS.
    What method could be used so that the bat file is similar?
    Are you referring to V2 Log collector? I cannot find CBS and DISM folders in the ZIP file created on the desktop.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd
All times are GMT -5. The time now is 12:16.
Find Us




Windows 10 Forums