Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @ECHO OFF
- IF [%1] EQU [] (goto showHelp)
- SET esdFile=%1
- IF "%esdFile%"=="/h" (goto showHelp)
- IF "%esdFile%"=="/?" (goto showHelp)
- IF NOT EXIST "%esdFile%" (GOTO fileNotFound) ELSE (GOTO runGetWim)
- :runGetWim
- echo dism /Get-WimInfo /WimFile:%esdFile%
- dism /Get-WimInfo /WimFile:%esdFile%
- echo Enter an index # to export a WIM file, or press ENTER to quit.
- set /p wimIndex=Index Number:
- if "%wimIndex%"=="" (GOTO exit)
- echo Enter a filename for the exported WIM file. (Default=EXPORTED-INSTALL.WIM).
- set /p wimFile=Save WIM file as:
- IF "%wimFile%"=="" (SET wimFile=EXPORTED-INSTALL.WIM) ELSE GOTO :runExportWIM
- :runExportWim
- echo dism /export-image /SourceImageFile:%esdFile% /SourceIndex:%wimIndex% /DestinationImageFile:%wimFile% /Compress:max /CheckIntegrity
- dism /export-image /SourceImageFile:%esdFile% /SourceIndex:%wimIndex% /DestinationImageFile:%wimFile% /Compress:max /CheckIntegrity
- GOTO exit
- :fileNotFound
- echo =========================================================
- echo ERROR: ESD file %esdFile% not found!
- :showHelp
- echo =========================================================
- echo DUMP-WIM.cmd
- echo USAGE: dump-wim.cmd [Source_File.ESD]
- echo EXAMPLE: dump-wim.cmd INSTALL.ESD
- echo =========================================================
- GOTO exit
- :exit
- SET "esdFile="
- SET "wimIndex="
- SET "wimFile="
- exit /b
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement