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

Page 9 of 152 FirstFirst ... 78910111959109 ... LastLast

  1. Posts : 41,640
    windows 10 professional version 1607 build 14393.969 64 bit
       #81

    OP had problems posting tuneup.bat results: post #33
    Occasional BSOD: Event errors on many harddisk
      My Computer


  2. Posts : 7,623
    Windows 10 Home 20H2
       #82

    @Ztruker, I found an alternative to SETLOCAL EnableDelayedExpansion
    Code:
    ::=========================================================================================
    Title  PowerShell is zipping the log files... & mode con cols=120 lines=10
    Set A=%LOG% & Set B=%F%\energy-report.html & Set C=%F%\battery-report.html
    Set D=%F%\sleepstudy-report.html & Set E=%F%\system-sleep-diagnostics.html
    For %%# in (%A% %B% %C% %D% %E%) Do (If exist %%# Call:[Operation] "%%#")
    PowerShell.exe Compress-Archive -Path %zipSource% -DestinationPath %ZIP% >NUL 2>&1
    Del "%temp%\(+).vbs" & Set "CMD=%Temp%\CMD.cmd" & Set "#=Echo Echo" 
    (Echo @echo off^&Title   Operations completed successfully.^&mode con cols=89 lines=14^&color 17 
    %#%.
    %#%  #######################################################################################
    %#%  #                                                                                     #
    %#%  #                               Get_Powercfg_info.bat                                 #
    %#%  #                                                                                     #
    %#%  #      The log files have been put into the following ZIP file:                       #
    %#%  #                                                                                     #
    %#%       %ZIP%.zip
    %#%  #                                                                                     #
    %#%  #      Please upload the file as an attachment to your post on TenForums.             #
    %#%  #      Press any key to close this window.                                            #
    %#%  #                                                                                     #
    %#%  #######################################################################################
    Echo Pause ^>nul ^& Exit)> "%CMD%" & Timeout 1 /nobreak>Nul & Start "" "%CMD%" & Exit
    :[Operation] 
    If not "%zipSource%"=="%~1" (Set "$=%zipSource%") 
    If "%zipSource%"=="" (Set "zipSource=%$% %~1") else (Set "zipSource=%$%, %~1")  
      My Computer


  3. Posts : 14,050
    Windows 11 Pro X64 22H2 22621.1848
    Thread Starter
       #83

    Matthew Wai said:

    The progress will not be written into Tuneup.log

    That's fine, don't care at that point. It's while the batch file is running that I like to see the progress.
    I'm not a big fan of code that runs for any length of time without giving some indication of what is happening.
    We can try it and see what the reaction is from the users.


    Errors will be written into Tuneup.log. For example,
    Code:
    Windows Resource Protection found corrupt files but was unable to fix some of them.
    For online repairs, details are included in the CBS log file located at
    windir\Logs\CBS\CBS.log. For example C:\Windows\Logs\CBS\CBS.log. For offline
    repairs, details are included in the log file provided by the /OFFLOGFILE flag.
    Code:
    Found 0x1 clusters allocated to file "\Users\Matthew_Wai\AppData\Local\2BrightSparks\SyncBackFree\Settings.ini <0x1,0x236ec>" at offset "0" marked as free
    "Chkdsk /scan" is restarting due to stale information about crosslinks.


    That's good then.


    I am unable to create DISM errors.

    Me either. Will have to wait for feedback from users that do have system file corruption.

    Feel free to use your modified version. You are the one who wants to read and understand the codes.

    Not just for me but for anyone we ask to run the batch file who wants to understand what it does BEFORE they run it.
    Do you prefer obfuscated code or is it just a habit you've gotten into?

    Please at lest think about it.

    Replies inside quote.
      My Computers


  4. Posts : 41,640
    windows 10 professional version 1607 build 14393.969 64 bit
       #84

    There are new threads with Windows upgrade failure.
    I'd like to test drive the commands to collect setupmem.dmp, etc. if available.
    What is the latest script?

    %SystemDrive%$Windows.~bt\Sources\Rollback
    %WinDir%\Panther\NewOS\Rollback
    setupapi.dev.log
    BlueBox.log
    etc.
      My Computer


  5. Posts : 41,640
    windows 10 professional version 1607 build 14393.969 64 bit
       #85

    In this thread:
    Frequent BSOD'S for the past 4 months

    OP posted incomplete results for each:
    tuneup.bat
    disparinfo.bat
      My Computer


  6. Posts : 7,623
    Windows 10 Home 20H2
       #86

    zbook said:
    What is the latest script?
    Place to store small batch files for use in the BSOD forum
      My Computer


  7. Posts : 41,640
    windows 10 professional version 1607 build 14393.969 64 bit
       #87

    Thx.
    Please add to other scripts so that it is available.
      My Computer


  8. Posts : 7,623
    Windows 10 Home 20H2
       #88

    I have no permission to add it. Do you?
      My Computer


  9. Posts : 41,640
    windows 10 professional version 1607 build 14393.969 64 bit
       #89

    I've not tried modifying them.
      My Computer


  10. Posts : 1,862
    Windows 10 Pro 2004 20H1
       #90

    Ztruker said:
    Not just for me but for anyone we ask to run the batch file who wants to understand what it does BEFORE they run it.
    Do you prefer obfuscated code or is it just a habit you've gotten into?
    Excellent point, and one that needs to be addressed, especially VBScript in TF batch files.

    Aside from the security issues using VBScript, who will understand what this code is doing...

    (Net session >nul 2>&1)&&Goto:✱||Echo CreateObject^("Shell.Application"^). ^
    ShellExecute "%~0","✶","","RunAs",1 >"%temp%\(+).vbs"&&"%temp%\(+).vbs"&EXIT /B


    You could elevate the batch file using PowerShell.

    It would be safer, and probably easier to read, with some added documentation.
    Last edited by OldNavyGuy; 02 Nov 2020 at 04:12.
      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 10:32.
Find Us




Windows 10 Forums