|
高手来看 看,帮忙分析分析
执行 “Dism /Capture-Image /ImageFile:%backto%:\backup_win.wim /CaptureDir:%backfrom%:\ /Name:backup /Description:win备份1” 后,不管是备份成败还是失败就退出了,后面的都不执行
或者执行“ Dism /Append-Image /ImageFile:%backto%:\backup_win.wim /CaptureDir:%backfrom%:\ /Name:backup /Description:win备份2” 后,不管是备份成败还是失败就退出了,后面的都不执行
dismi版本是10.0.17134.1,win10的版本,运行环境是win8.1 的恢复环境winre.wim
部分代码
if /i "%wimsf%"=="D" goto backup1
if /i "%wimsf%"=="R" goto rebackup
:backup1
cls
echo.
echo.
echo.
echo DISM正在全新备份 %backfrom% 盘到 %backto% 盘,可能要花费数分钟,请稍等
echo.
if exist "%backto%:\backup_win.wim" (
attrib -r -h -s %backto%:\backup_win.wim
del /F /S /Q %backto%:\backup_win.wim
)
Dism /Capture-Image /ImageFile:%backto%:\backup_win.wim /CaptureDir:%backfrom%:\ /Name:backup /Description:win备份1
if %errorlevel%==0(
set mess10= 系统备份完成!按任意键退出
goto tuichu
) else (
echo.
echo 系统备份失败!按任意键退出。
pause>nul
exit
)
:rebackup
cls
echo.
echo.
echo.
echo DISM正在增量备份 %backfrom% 盘到 %backto% 盘,可能要花费数分钟,请稍等
echo.
attrib -r -h -s %backto%:\backup_win.wim
Dism /Append-Image /ImageFile:%backto%:\backup_win.wim /CaptureDir:%backfrom%:\ /Name:backup /Description:win备份2
if %errorlevel%==0(
set mess10= 增量备份完成!按任意键退出
goto tuichu
) else (
echo.
echo 增量备份失败!按任意键退出。
pause>nul
exit
)
:tuichu
echo.
echo %mess10%
echo.
attrib +r +h +s %backto%:\backup_win.wim
pause>nul |
|