TA的每日心情 | 怒 2017-11-24 01:58 |
---|
签到天数: 3 天 [LV.2]偶尔看看I
|
- ENVI^ ENVIMODE=1
- ENVI &&DISMAPI_E_DISMAPI_ALREADY_INITIALIZED=1
- ENVI &&DismLogErrorsWarningsInfo=2
- ENVI &&DismImageIndex=0
- ENVI &&DISM_MOUNT_READWRITE=0x00000000
- ENVI &&DISM_DISCARD_IMAGE=0x00000001
- ENVI &&DismWorkTime=
- ENVI^ WndProc1,&&WndProc1Addr // WndProc1为PECMD2012专用语法格式,绑定到当前 PE执行栈,以寻找 OnWndProc1 函数 //相当于MountProgressCallback
- CALL wmain
- ENVI^ WndProc1=0 // WndProc1 解绑
- _SUB wmain
- CALL $--qd --ret:&&DismInitializeRet dismapi.dll,DismInitialize,#%&DismLogErrorsWarningsInfo%,$C:\MyLogFile.txt,#0
- CALL $--qd --ret:&&DismInitializeRet dismapi.dll,DismInitialize,#%&DismLogErrorsWarningsInfo%,$C:\MyLogFile.txt,#0
- IFEX #[ %&&DismInitializeRet%<>0 & %&&DismInitializeRet%<>%&DISMAPI_E_DISMAPI_ALREADY_INITIALIZED% ],
- {*
- MESS. DismInitialize Failed !!!@%&&DismInitializeRet%
- CALL Cleanup
- }
- IFEX C:\MountPath\,! MDIR C:\MountPath
- ENVI &DismWorkTime=DismMountImage
- CALL $--qd --16 --ret:&&DismMountImageRet dismapi.dll,DismMountImage,$C:\a.wim,$C:\MountPath,#1,#0,#%&DismImageIndex%,#%&DISM_MOUNT_READWRITE%,#0,#%&WndProc1Addr%,#0
- IFEX #%&&DismMountImageRet%<>0,
- {*
- MESS. DismMountImage Failed !!!@%&&DismMountImageRet%
- }
- ENVI &DismWorkTime=DismUnmountImage
- CALL $--qd --16 --ret:&&DismUnmountImageRet dismapi.dll,DismUnmountImage,$C:\MountPath,#%&DISM_DISCARD_IMAGE%,#0,#%&WndProc1Addr%,#0
- IFEX #%&&DismUnmountImageRet%<>0,
- {*
- MESS. DismUnmountImage Failed !!!@%&&DismUnmountImageRet%
- }
- _END
- _SUB Cleanup
- _END
- _SUB OnWndProc1
- //%~1 uiCurrent 当前进度值
- //%~2 uiTotal 总进度值
- //%~3 pUserData
- IFEX #%~1=%~2,
- {*
- MESS. %&DismWorkTime% Complete@
- }
- _END
复制代码
简单的挂载,卸载,及进度获取。(进度的难点已翻译好)参考:
https://learn.microsoft.com/zh-c ... ple?view=windows-11
|
上一篇: 下载不下来 提示未知错误下一篇: USM_v5.0.2022.0622F 制作U盘后,不显示U盘了
|