|
本帖最后由 oym2016 于 2025-4-24 08:18 编辑
批处理中:
1. wmic shadowcopy call create volume=c:\
2. powershell -Command ".\script.ps1"
script.ps1:
Invoke-CimMethod -MethodName Create -ClassName Win32_ShadowCopy -Arguments @{ Volume= "C:\\" }
3. 第三方工具 wimlib-imagex.exe snapshot.exe ....
只是wimlib-imagex.exe 是Wim格式 通用性强点 用 wimlib-imagex.exe 做备份:
set name=%date:~0,4%%date:~5,2%%date:~8,2%_%time:~0,2%%time:~3,2%%time:~6,2%
set timestamp=%name: =0%
if exist Win10.wim (
@echo 追加wim
Wimlib-imagex append C: Win10.wim %timestamp%_C_Bak %timestamp%_C_Bak --check --snapshot
) else (
@echo 新建wim
Wimlib-imagex capture C: Win10.wim %timestamp%_C_Bak %timestamp%_C_Bak --check --snapshot
)
|
|