|
感謝紅毛大
我已經完成並測試OK了
如下:
- //流程架構為:建立RAMDISK=>如果RAM夠大則擴充RAMDISK以便複製WIM到Y:再做掛載 ==>完成後 隨身碟可移除
- // L>RAM不夠大則RAMDISK只做掛載使用,不複製WIM ==>完成後 隨身碟不可移除
-
- SET OUTTOOL=%CURDIR% //目前目錄
- PATH @%OUTTOOL%
- SET xWIM=%OUTTOOL% //掛載WIM-來源
- SET MountPath=Y: //掛載WIM-目的
- IFEX X:\RXPE,RAMD ImDisk,L100,NTFS,Y: //XPE建立RAMDISK Y:
- TEXT 載入WIM檔中...請耐心等候
- IFEX MEMU>=1200,CALL Copy2RAM //如果可用RAM足夠的話 將WIM複製到RAMDISK Y:中再掛載(可移除隨身碟)
- WAIT 1000
- CALL mount
- WAIT 666
- IFEX X:\RXPE,TEAM FBWF L300 H400|LOAD %MountPath%\PESYSTEM\PESYSTEM.INI
- TEXT 執行軟體基本設置...請耐心等候
- FORX /S %MountPath%\outtool.ini,WimInI,0,LOAD "%WimInI%" //搜尋INI檔並執行
- _SUB Copy2RAM
- IFEX X:\RXPE,RAMD ImDisk,L600 H1024,,Y: //RAM夠大 擴充RAMDISK
- //先刪除後重建目錄,以免手動重載時出問題
- IFEX Y:\xWIM,FILE Y:\xWIM
- MDIR Y:\xWIM
- SET xWIM=Y:\xWIM //改變WIM掛載點為RAMDISK Y:
- FILE -simpleprogress %OUTTOOL%\WIMMOD=>%xWIM%\ //複製相同WIM到RAMDISK Y:
- IFEX x:\RXPE,FILE -simpleprogress %OUTTOOL%\WIMXPE=>%xWIM%\!FILE -simpleprogress %OUTTOOL%\WIMX64=>%xWIM%\ //依PE不同,複製相異WIM到RAMDISK Y:
- _END
- _SUB mount
- IFEX X:\RXPE,SET x86x64=%xWIM%\WIMXPE!SET x86x64=%xWIM%\WIMX64 //依據PE不同 掛載相異部份WIM
- //先獲取所有WIM路徑,取出檔名建立掛載用目錄,再把所有WIM掛載到對應目錄下
- FORX %x86x64%\*.wim,Wim,0,TEAM NAME WimDir=%Wim%|MDIR %MountPath%\%WimDir%|MOUN "%Wim%","%MountPath%\%WimDir%",1,%MountPath%\ //相異WIM
- FORX %xWIM%\WIMMOD\*.wim,Wim,0,TEAM NAME WimDir=%Wim%|MDIR %MountPath%\%WimDir%|MOUN "%Wim%","%MountPath%\%WimDir%",1,%MountPath%\ //相同WIM
- _END
复制代码 |
|