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


  1. Posts : 18,044
    Win 10 Pro 64-bit v1909 - Build 18363 Custom ISO Install
       #591

    Hello @einstein1969,

    einstein1969 said:
    I quickly tried to set up a possible template, shared the script in the thread where I used it.

    Your link goes to the TenForums main page!
      My Computer


  2. Posts : 250
    Windows 10 22H2
       #592

    I have correct the link.

    Pc fail to wakeup from sleep
      My Computers


  3. Posts : 7,607
    Windows 10 Home 20H2
       #593

    einstein1969 said:
    Mine was just a suggestion on how to deal with the problem, then we need to work on it.
    I have modified your suggestion. See below:
    Code:
    @echo off 
    cd /d "%~dp0" & Set "[Output]=Output.txt" & If "%1"=="[Progress]" (Goto %2) 
    ::===============================================================
    ::The following is for ScanHealth.
    Set "[0]=Empty.txt" & Set "[Size_file]=Size.txt"
    If exist "%[Output]%" (DEL /F /Q "%[Output]%")
    If exist "%[Size_file]%" (DEL /F /Q "%[Size_file]%")
    Echo 0 >"%[Size_file]%"
    (Del /F /Q "%[0]%" 2>nul
    DISM /online /cleanup-image /ScanHealth >"%[Output]%"
    Echo. >"%[0]%")|%0 [Progress] [Of_ScanHealth]
    Goto [Post_ScanHealth]
    Exit
    :[Of_ScanHealth]
    Title  (2) DISM is scanning the image of Windows. & mode con cols=65 lines=6
    Echo.&Echo     Operation (2): DISM is scanning the image of Windows.
    Echo.&Echo -^> Deployment Image Servicing and Management tool
    Ping -n 5 127.0.0.1 >Nul 
    For /L %%N in (0) Do (
    For /f "delims=" %%# in ('Type "%[Size_file]%"') Do (Set "[Old_size]=%%#")
    For /f "delims=" %%# in ('Type "%[Output]%"') Do (Set "Text=%%#")
    For %%# in ("%[Output]%") Do (Set [New_size]=%%~z#)
    CMD /C "If %%[New_size]%% GTR %%[Old_size]%% (Cls&Echo.&Echo -^> %%Text%%)"
    CMD /C "Echo %%[New_size]%%>"%[Size_file]%""
    If exist "%[0]%" Exit
    Ping -n 5 127.0.0.1 >Nul)
    Goto:EOF
    :[Post_ScanHealth]
    Echo    DISM ScanHealth has been completed.
    Pause
    The above code will display the progress of ScanHealth and write the output into Output.txt. However, I cannot do the same to SFC /ScanNow . If you have a solution, please post the code here.

    The following command will display the progress and write the output into Output.txt, but the output is very ugly. Try it yourself, and see for yourself.

    PowerShell SFC /ScanNow^|tee "D:\Output.txt"

    If you have a solution, please post the code here.
    On completion, run the following in a batch script and see the output.

    For /f "delims=" %%# in ('Type "D:\Output.txt"') Do (Echo "%%#")

    I am unable to describe the output in English.
    It is impossible to improve the output via a script. I have tried PowerShell, CMD and VBScript, and none of them works.
      My Computer


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

    Matthew Wai said:
    What is the full path of the memory dump file?
    PS You may use this symbol for "less than or equal to".
    Where is it found on a standard keyboard?


    C:\Windows\memory.dmp
    %SystemRoot%\memory.dmp


    Post problem reports here for Batch files for use in BSOD debugging-memory.dmp-directory.jpg
      My Computer


  5. Posts : 7,607
    Windows 10 Home 20H2
       #595

    zbook said:
    a) age < or = 30 days
    If the file was created two months ago and modified two days ago, should the file be zipped?
    The creation time could be different from the modification time.

    PS You have to copy and paste this symbol
      My Computer


  6. Posts : 41,476
    windows 10 professional version 1607 build 14393.969 64 bit
       #596

    Which criteria is used for V2 mini dumps? (created or modified)
      My Computer


  7. Posts : 250
    Windows 10 22H2
       #597

    last attempt whit sfc

    Code:
    ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    :: By Francesco Poscetti aka einstein1969 - for www.tenforums.com
    ::
    :: ver. 0.1 - 21/03/2021 
    ::
    :: Reference:
    :: https://docs.microsoft.com/en-us/troubleshoot/windows-client/deployment/analyze-sfc-program-log-file-entries
    :: https://support.microsoft.com/it-it/topic/description-of-the-windows-file-protection-feature-db28f515-6512-63d1-6178-982ed2022ffb
    :: https://docs.microsoft.com/it-it/windows/win32/wfp/protected-file-list
    :: https://docs.microsoft.com/it-it/windows/win32/wfp/detecting-file-replacement (C++ code)
    ::
    ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    @echo off & setlocal EnableDelayedExpansion & if "%1" == "Progress" goto :Progress
    
    mode con cols=62 lines=5
    cd %TMP%
    
    ( 
      del stop.tmp 2>nul
      sfc /scannow >out.txt
      type nul > stop.tmp
    ) | %0 Progress SFC
    
    pause
    cls
    
    ( 
      del stop.tmp 2>nul
      DISM /online /cleanup-image /scanhealth >out.txt
      type nul > stop.tmp
    ) | %0 Progress DISM
    
    pause
    
    goto :eof
    
    :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    :Progress
      Title %2: Please wait...
      echo %2 is running...
    
      for /f %%a in ('copy /Z "%~dpf0" nul') do set "CR=%%a"
    goto :Progress_%2
    :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    :Progress_DISM
    for /L %%N in (0) do (
      for /f "tokens=*" %%S in ('more out.txt') do (
        set u=%%S
        if not "x!u:[=!"=="x!u!" set v=%%S
      ) 
      if defined v  (
        title %2: [!v:~29,5!]
        set /P "=.!CR!!v!!CR!" < nul
      )
      if exist stop.tmp echo(&exit
      ping -n 5 127.0.0.1 >nul 
    )
    goto :eof
    :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    :Progress_SFC
    
    set "CBS.log=%windir%\Logs\CBS\CBS.log"
    
    for /f %%L in ('FIND /V /C "" ^< %CBS.log%') do set /A LN=%%L-1
    
    for /L %%N in (0) do (
      for /f "tokens=*" %%S in ('More %CBS.log% +%LN% ^| findstr /c:"[SR]" ^| findstr /C:"Verifying 100" ^| FIND /V /C ""') do set /A v=%%S0*10
      title %2: [!v!]
      set /p "=.!CR!Processed about !v! files...!CR!" <NUL
      if exist stop.tmp echo(&exit
      ping -n 5 127.0.0.1 >nul 
    )
    goto:eof
    :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
      My Computers


  8. Posts : 7,607
    Windows 10 Home 20H2
       #598

    zbook said:
    Which criteria is used for V2 mini dumps? (created or modified)
    No criteria are used although the modification date will be written into a log file.
    The modification date = the highlighted part in the following code extracted from V2 Log collector).
    Code:
    $CrashSettings = "HKLM:\SYSTEM\CurrentControlSet\Control\CrashControl"
    $DefaultPath   = Join-Path -Path $env:SystemRoot -ChildPath "MEMORY.dmp"
    $LengthMB      = @{Name="Size (MB)";Expression={[math]::Round($_.Length / 1MB, 2)}}
    $Properties    = "LastWriteTime", $LengthMB, "FullName"
      My Computer


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

    Saving to the desktop is a common problem.
    Saving to the downloads folder typically works.
    So a command which saves to the desktop may be sufficient.
    The OP can then decide whether to zip or upload to a cloud sharing application.
    Creating a zipped dump is ideal.
    After a clean install will windows be able to zip / unzip or will 7zip or similar application be required?
      My Computer


  10. Posts : 7,607
    Windows 10 Home 20H2
       #600

    File Explorer can extract files from a ZIP file.
      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 16:10.
Find Us




Windows 10 Forums