Ejemplo de los recursos a los que me refiero:
Se necesitan unos requisitos y dependencias para usar este Script:
· Saber de lo que estoy hablando.
· Conocer el nombre de los recursos que quieres reemplazar y disponer de tus imágenes ya modificados (obviamente).
· Dism e ImageX (WAIK/WADK).
· Anolis Resourcer > http://www.anol.is/resourcer/
Las instrucciones de uso y un extenso tutorial lo publiqué en este otro tema: http://foro.elhacker.net/windows/guia_de_personalizacion_de_imagenes_de_implementacion_de_windows_wim_parte_4-t412468.0.html así que lo haré de nuevo de manera resumida: solo tienen que escribir en un archivo de texto delimitando por puntoycomas los recursos que quieren reemplazar, el nombre del recurso y el índice, así como los archivos que quieran reemplazar, y configurar las variables documentadas del Script (La ubicación de la imagen, el directorio de montaje, etc...)
Nota: Ver el ejemplo del archivo delimitado dentro del enlace de abajo o en las instrucciones extendidas del enlace de arriba.
Todo lo necesario está incluido en este archivo comprimido:
http://www.mediafire.com/download/ktzms7i09qt4n2b/wim+resource+replacer+0.2.rar
Imágenes:
(Código corregido, el otro que subí estaba incompleto)
WIM Resource Replacer.cmd
Código
@Echo OFF REM ================= REM Console Settings: REM ================= Title WIM Resource Replacer - By Elektro Mode Con Cols=150 Lines=50 REM ===== REM Info: REM ===== Echo+ Echo -------------------------------------------------------------------------------------------------- Echo This script mounts a Windows Image ^(WIM^) and then replaces image resources inside resource files Echo -------------------------------------------------------------------------------------------------- Echo+ REM ==================== REM User defined values: REM ==================== REM This value indicates whether the Windows Image should be mounted. REM True = 'DISM' will try to mount the 'WIM' image. REM False = 'DISM' will not try to mount the WIM image. REM Set this value to 'FALSE' if the 'WIM' image is already mounted in the specified mount directory, REM Otherwise, keep it as 'TRUE'. Set "MountImage=True" REM This value indicates whether the Windows Image should be unmounted at the end. REM True = 'DISM' will try to unmount the 'WIM' image. REM False = 'DISM' will not try to unmount the WIM image. REM Set this value to 'FALSE' if you want to keep the image mounted to make other changes, REM Otherwise, keep it as 'TRUE'. Set "UnmountImage=True" REM This value indicates whether the Windows Image should be rebuilt at the end. REM True = 'ImageX' will try to rebuild the 'WIM' image. REM False = 'ImageX' will keep the 'WIM' image as is. REM Set this value to 'FALSE' if you want to keep the image with normal size to make other changes, REM Otherwise, keep it as 'TRUE'. Set "Rebuild=True" REM This value indicates whether the Windows Image should be cleaned-up at the end. REM True = 'Dism' will try to CleanUp the 'WIM' image components. REM False = 'Dism' will keep the 'WIM' image as is. REM Set this value to 'FALSE' if you want to keep the image with normal size to make other changes, REM Otherwise, keep it as 'TRUE'. Set "CleanUp=True" REM This value indicates the 'WIM' image to be mounted. REM This value indicates the Image Index of the 'WIM' image. Set "ImageIndex=2" REM This value indicates the directory where to mount the 'WIM' image. REM This value indicates the ubication of Anolis Resourcer 'Anolis.exe' file. REM This value indicates the textfile that contains the Recource files to replace. REM This value indicates the ubication of 'ImageX.exe' file. REM This value indicates the ubication of a custom 'DISM.exe' file if needed. REM Default ubication: "%SystemRoot%\System32\Dism.exe" REM This value indicates the ubication of the logfile that will record 'DISM' errors. REM This value indicates the logging-level of the 'DISM' process. REM 1 = Errors only REM 2 = Errors and warnings REM 3 = Errors, warnings, and informational REM 4 = All of the information listed previously, plus debug output Set /A "DismLogLevel=2" REM This value indicates the ubication of the logfile that will record Main information. REM ===== REM Main: REM ===== :: Call Methods. Call :CheckErrors Call :CreateLogs Call :CreateMountDir Call :GetWIMSizeBefore Call :StartTimer Call :Mount CLS Call :ParseResources Call :Unmount Call :StopTimer Call :GetWIMSizeAfter Call :EndLog Pause&Exit REM ======== REM Methods: REM ======== :CreateLogs :: Create the 'DISM' logfile with 'ANSI' encoding, :: this is necessary to record a non-default 'DISM' loglevel such as '1' or '2'. :: Create the Main Logfile and record starting info on it. ( Echo+ Echo WIM Resource Replacer Echo =========================== Echo /\/\/\/\/\/\/\/\/\/\/\/\/\/ Echo+ Echo+ Echo+ Echo+ Echo+ Echo =========================== )>"%Logfile%" :: Display starting log info. Type "%Logfile%" :: Continue writting log. ( Echo+ Echo Resource conflicts: Echo =================== Echo+ )>>"%LogFile%" Goto:EOF :EndLog ( Echo+ Echo [i] Done! Echo+ )>>"%LogFile%" :: Display ending information. CLS Type "%LogFile%" Goto:EOF :CreateMountDir :: Create the mount directory. ( ) ) || ( Echo+ Echo [i] Ensure that you have Admin rights to create the directory. Echo+ Pause&Exit ) Goto:EOF :Mount :: Mount the Windows Image into the directory. Echo+ Echo [+] Mounting WIM Image... "%Dism%" /Mount-Image /ImageFile:"%WindowsImage%" /Index:"%ImageIndex%" /MountDir:"%MountDir%" /English /LogPath:"%DismLogfile%" /LogLevel:"%DismLogLevel%" || ( Echo+ Echo [i] Ensure that you have Admin rights to write inside the directory. Echo [i] Ensure that the directory is fully empty. Echo+ REM Try to unmount the failed image and discard changes. Echo [+] Unmounting and discarding changes... "%Dism%" /Unmount-WIM /Discard /MountDir:"%MountDir%" ) Pause&Exit ) ) Goto:EOF :CleanUp Echo [+] CleaningUp WIM Image... "%Dism%" /CleanUp-Image /StartComponentCleanUp /Image:"%MountDir%" /English /LogPath:"%DismLogfile%" /LogLevel:"%DismLogLevel%" /Quiet Echo+ Goto:EOF :Unmount :: Unmount the Windows Image commiting changes. Echo [+] Unmounting WIM Image... "%Dism%" /Unmount-WIM /Commit /MountDir:"%MountDir%" /English /LogPath:"%DismLogfile%" /LogLevel:"%DismLogLevel%" ) Goto:EOF :Rebuild Echo+ Echo [+] Rebuilding WIM image... ("%ImageX%" /Compress Maximum /Export "%WindowsImage%" "*" "%TEMP%\Rebuilt Image.wim" /Check) && ( ) || ( ) Goto :EOF :StartTimer Goto :EOF :StopTimer ( )>"%TEMP%\%~n0 MinuteDiff.vbs" 'Cscript.exe /Nologo "%TEMP%\%~n0 MinuteDiff.vbs"' ) Goto:EOF :WriteConvertBytesScript ( Echo+ Echo End Function Echo+ Echo Level = Level + 1 Echo End Function Echo+ )>"%TEMP%\%~n0 Convert Bytes.vbs" Goto:EOF :GetWIMSizeBefore Call :WriteConvertBytesScript 'Cscript.exe /Nologo "%TEMP%\%~n0 Convert Bytes.vbs" "%WIMSizeBefore%"' ) Goto:EOF :GetWIMSizeAfter Call :WriteConvertBytesScript 'Cscript.exe /Nologo "%TEMP%\%~n0 Convert Bytes.vbs" "%WIMSizeAfter%"' ) Goto:EOF :TakeOwn ( Takeown.exe /F "%~f1" ICacls.exe "%~f1" /Grant "%UserName%":"F" Attrib.exe -R -A -S -H -I "%~f1" Goto:EOF :ParseResources Set /A "ResourceSuccessCount=0" Set /A "ResourceFailsCount=0" Set /A "ResourceNotFoundCount=0" Set /A "FilesAddedCount=0" Set /A "FilesFailsCount=0" Set /A "FilesNotFoundCount=0" ) Goto:EOF :CopyFile Set /A "FilesNotFoundCount+=1" Goto:EOF ) Set /A "FilesFailsCount+=1" Goto:EOF ) Set /A "FilesFailsCount+=1" Goto:EOF ) Set /A "FilesAddedCount+=1" Goto:EOF :ReplaceResource Set /A "ResourceNotFoundCount+=1" Goto:EOF ) Set /A "ResourceNotFoundCount+=1" Goto:EOF ) Set /A "ResourceFailsCount+=1" Goto:EOF ) Start /W "Anolis" "%Anolis%" -op:upd -src:"%~f1" -type:Bitmap -name:"%~2" -lang:1033 -file:"%~f3") ) Start /W "Anolis" "%Anolis%" -op:upd -src:"%~f1" -type:Icon -name:"%~2" -lang:1033 -file:"%~f3") ) Set /A "ResourceSuccessCount+=1" Goto:EOF REM ==================== REM File Error Controls: REM ==================== :CheckErrors :: WIM File Error-Check. Pause&Exit ) :: ResourceList File Error-Check. Pause&Exit ) :: 'DISM.exe' File Error-Check. Pause&Exit ) :: 'ImageX.exe' File Error-Check. Pause&Exit ) :: 'MountImage' Value check. Echo [x] Error parsing parameter 'MountImage', Pause&Exit ) :: 'UnmountImage' Value check. Echo [x] Error parsing parameter 'UnmountImage', Pause&Exit ) :: 'Rebuild' Value check. Echo [x] Error parsing parameter 'Rebuild', Pause&Exit ) :: 'CleanUp' Value check. Echo [x] Error parsing parameter 'CleanUp', Pause&Exit ) :: 'DismLogLevel' Value check. Echo [x] Error parsing parameter 'DismLogLevel', Pause&Exit ) :: Anolis Resourcer File Error-Check. Pause&Exit ) Goto:EOF