Me interesa lo segundo - Como haría eso a grandes rasgos
( No se si será esto exactamente lo que quieres... )
1) Necesitas entender unos conceptos básicos (los cuales, discúlpame, pero no los explicaré, por que son extensos), infórmate un poco en la sección "Definiciones" de mi antigua publicación:
Guía de personalización de imágenes de implementación de Windows (WIM) (Parte 1) y a continuación sigue las instrucciones del paso '
1.0' de ese mismo post.
2) Después de entender más o menos lo que vas a hacer y como hacerlo, debes capturar el estado del sistema operativo, si, he dicho capturar, es una captura, no grabación ni virtualización ni etc.
3) Con el siguiente Script puedes realizar la tarea, debes modficar los parámetros definidos por el usuario, la funcionalidad de cada parámetro está documentado, espero que no andes mal de Inglés
:
Debes modificar en el Script los valores donde ubico la herramienta
Dism de Microsoft, así como el nombre interno de la imagen del SO, y la partición que deseas capturar (ten en cuenta que debes capturar la partición desde otra partición distinta, no puedes capturar la partición activa), y por los demás valores no debes preocuparte, déjalos como están.
REM =================
REM Console Settings:
REM =================
Title WIM Capture Tool - By Elektro
Mode
Con Cols=150 Lines=50
CHCP 1252 1
>NUL & REM Windows-1252, Spanish-Latin.
REM =====
REM Info:
REM =====
Echo --------------------------------------------------------------------------------
Echo This script captures a partition with Windows installed and creates a WIM Image.
Echo --------------------------------------------------------------------------------
REM ====================
REM User defined values:
REM ====================
:: This value indicates the partition to capture.
Set "CapturePartition=C:"
:: This value indicates the 'DISM' script that contains exclusions.
Set "CaptureScript=
%CD%\Capture.ini"
:: This value indicates the resulting WIM file.
Set "OutputWIMFile=
%UserProfile%\Desktop\Win81.x64.wim"
:: This value indicates the name for the WIM image.
Set "ImageName=Windows 8.1"
:: This value indicates the description for the WIM image.
Set "ImageDescription=Windows 8.1 x64 Mod"
:: This value indicates the ubication of a custom 'DISM.exe' file if needed.
:: Default ubication: "%SystemRoot%\System32\Dism.exe"
Set "Dism=
%CD%\..\Tools\Dism\Dism.exe"
:: This value indicates the ubication of the logfile that will record 'DISM' errors.
Set "DismLogfile=
%CD%\
%~n0 DISM.log"
:: This value indicates the logging-level of the 'DISM' process.
:: 1 = Errors only
:: 2 = Errors and warnings
:: 3 = Errors, warnings, and informational
:: 4 = All of the information listed previously, plus debug output
REM =====
REM Main:
REM =====
:: Call Methods.
REM ========
REM Methods:
REM ========
:CreateLog
:: Create the logfile and record starting info on it.
(
Echo ===========================
Echo %DATE% ^| %TIME:~0,-3% Echo /\/\/\/\/\/\/\/\/\/\/\/\/\/
Echo [i] Capture Partition:
%CapturePartition% Echo [i] Capture Script...:
%CaptureScript% Echo [i] Output WIM File..:
%OutputWIMFile% Echo [i] Image Name.......:
%ImageName% Echo [i] Image Description:
%ImageDescription% Echo [i] Dism Log file....:
%DismLogfile% Echo ===========================
)>"%DismLogfile%"
:: Display starting log info.
Type "%DismLogfile%"
:EndLog
(
Echo [i] Elapsed Time:
%ElapsedTime% )>>"%DismLogfile%"
:: Display ending information.
CLS
Type "%DismLogfile%"
:StartTimer
Set "StartingDate=
%Date%"
Set "StarttingTime=
%Time:~0,-3%"
:StopTimer
(
Echo Minutes = DateDiff
^("n", "
%StartingDate% %StarttingTime%", Now
^) )>"%TEMP%\%~n0 MinuteDiff.vbs"
For /F "Tokens=*"
%%#
In ( 'Cscript.exe /Nologo "%TEMP%\%~n0 MinuteDiff.vbs"'
)
:Capture
:: Mount the Windows Image into the directory.
Echo [+] Capturing Partition '
%CapturePartition%'...
"
%Dism%" /Capture-Image /ImageFile:"
%OutputWIMFile%" /CaptureDir:"
%CapturePartition%" /ConfigFile:"
%CaptureScript%" /Name:"
%ImageName%" /Description:"
%ImageDescription%" /Compress:"Maximum" /CheckIntegrity /
Verify /Bootable /NoRpFix /English /LogPath:"
%DismLogfile%" /LogLevel:"
%DismLogLevel%"
|| ( Echo [x] Error capturing the partition.
)
REM ===============
REM Error Handling:
REM ===============
:CheckErrors
:: Capture Partition Error-Check.
Echo [x] Partition
not found at: "
%CapturePartition%"
| MORE
)
:: CaptureScript File Error-Check.
Echo [x] Capture Script file
not found at: "
%CaptureScript%"
| MORE
)
:: 'DISM.exe' File Error-Check.
Echo [x] 'DISM' process
not found at: "
%DISM%"
| MORE
)
:: 'DismLogLevel' Value check.
Echo "
%DismLogLevel%"
| Findstr.exe "
^\"[
^1-4]\"$" 1
>NUL 2
>&1
|| ( Echo [x] Error parsing parameter 'DismLogLevel',
Echo value '
%DismLogLevel%' is
not in range '1-4'.
)
Aparte de eso, incluyo un Script de inicialización (INI) que contiene los filtros de los elementos a excluir en la captura, esto es para que el archivo resultante pese mucho menos de lo necesairo.
[ExclusionList]
"System Volume Information"
"VirtualBox Guest Additions"
$Recycle.Bin
*.bak
*.chm
*.log
*.pdf
*.wim
BCD
appdb.dat
StaticCache.dat
DataStore.edb
ExplorerStartupLog.etl
ExplorerStartupLog_RunOnce.etl
FNTCACHE.DAT
FontCache-FontFace.dat
PackageRepository.edb
hiberfil.sys
iconcache_1024.db
iconcache_16.db
iconcache_1600.db
iconcache_256.db
iconcache_32.db
iconcache_48.db
iconcache_96.db
iconcache_exif.db
iconcache_idx.db
iconcache_sr.db
iconcache_wide.db
iconcache_wide_alternate.db
pagefile.sys
swapfile.sys
thumbcache_16.db
thumbcache_32.db
thumbcache_48.db
thumbcache_idx.db
ThumbCacheToDelete
TileCacheDefault-*_80.dat
TileCacheDefault-*_100.dat
TileCacheLogo-*_100.dat
TileCacheLogo-*_100.dat
TileCacheStartView-*_80.dat
TileCacheStartView-*_100.dat
TileCacheTickle-*_80.dat
TileCacheTickle-*_100.dat
WebCacheV01.dat
Windows.edb
Windows\CSC
WinPEpge.sys
[CompressionExclusionList]
*.mp3
Si no entiendes algo... bueno, pregunta.
Saludos