New
#591
Hello @einstein1969,
Your link goes to the TenForums main page!
I have correct the link.
Pc fail to wakeup from sleep
I have modified your suggestion. See below:
The above code will display the progress of ScanHealth and write the output into Output.txt. However, I cannot do the same toCode:@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. PauseSFC /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.
Which criteria is used for V2 mini dumps? (created or modified)
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 :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
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"
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?
File Explorer can extract files from a ZIP file.