Ignore log deletion error

This commit is contained in:
WindowsAddict 2024-07-28 08:03:09 +05:30
parent ad45cf0926
commit 816925bfef
1 changed files with 0 additions and 15 deletions

View File

@ -683,13 +683,6 @@ set preperror=
for /f %%a in ('%psc% "(Get-Date).ToString('yyyyMMdd-HHmmssfff')"') do set _time=%%a for /f %%a in ('%psc% "(Get-Date).ToString('yyyyMMdd-HHmmssfff')"') do set _time=%%a
if not defined _time (
%eline%
echo Failed to get time with Powershell command.
set preperror=1
exit /b
)
%psc% Stop-Service TrustedInstaller -force %nul% %psc% Stop-Service TrustedInstaller -force %nul%
%psc% Stop-Service TrustedInstaller -force %nul% %psc% Stop-Service TrustedInstaller -force %nul%
@ -707,14 +700,6 @@ copy /y /b "%SystemRoot%\logs\DISM\dism.log" "%SystemRoot%\logs\DISM\backup_dism
del /f /q "%SystemRoot%\logs\cbs\cbs.log" %nul% del /f /q "%SystemRoot%\logs\cbs\cbs.log" %nul%
del /f /q "%SystemRoot%\logs\DISM\dism.log" %nul% del /f /q "%SystemRoot%\logs\DISM\dism.log" %nul%
for %%# in (%SystemRoot%\logs\cbs\cbs.log %SystemRoot%\logs\DISM\dism.log) do if exist %%# (
%eline%
echo Failed to backup and delete %%#
echo Try again or Restart your system and then try again.
set preperror=1
exit /b
)
:: Initiate this to appear in fresh logs :: Initiate this to appear in fresh logs
dism /online /english /Get-CurrentEdition %nul% dism /online /english /Get-CurrentEdition %nul%