Q. How can I convert a version .9 Windows Imaging format (WIM) file to a 1.0 WIM file?

John Savill

January 15, 2009

2 Min Read
ITPro Today logo in a gray background | ITPro Today

A. For early users of Systems Management Server (SMS) 2003 and the Operating System Deployment feature pack, an early version (version 0.9 ) of the WIM was used, which is not compatible with the tools and technologies designed to deploy version 1.0 WIM files.
A number of options are available to recapture these .9 WIM files to the 1.0 format, but there is no direct conversion tool.
One option is to use SMS Operating System Deployment feature pack to deploy the 0.9 WIM file to a disk and then recapture the content of the disk using the new tools, such as imagex from the Vista Windows Automated Installation Kit (WAIK). It's important to not let the machine reboot after deploying the .9 image or the mini-setup wizard will run and set SID/GUID information on the installation making it unsuitable for future deployment.
As an alternative option Jason Galbreath created a version of imagex that works with the .9 version of WIM, which lets you deploy the .9 WIM to disk and then capture the disk to a 1.0 version WIM using the Microsoft imagex tool. Goto http://www.mountain-webs.com to download his imagex utility. Jason also created some scripts to clean up the .9 image of any SMS information if you are also migrating to System Center Configuration Manager (SCCM). The basic process of what you need to do manually is:

1. Export the 0.9 WIM
2. Mount the software registry hive from the extracted WIM. Here are some sample commands:
REG LOAD HKLMWIMSYS windowssystem32configsoftware
REG DELETE "HKLMWIMSYSMicrosoftWindows NTCurrentVersionWinlogonNotifyOSDWinlogon" /f
REG UNLOAD HKLMWIMSYS
3. Remove the file: windowssystem32osdwinlogon.dll.
4. Compress in WIM 1.0.
Below is a script to perform the process automatically. It takes two parameters: The first is the source WIM file name without the .wim extension and the second is the path to extract the WIM to. I recommend using a short path for the second parameter, so you don't run into any max path problems. I use X: for my operations so the command file will use X:MNT.

@ECHO OFF
ECHO Converting image: %1
ECHO This will CLEAR AND USE the %2MNT folder.
PAUSE
REM Remove esisting MNT folder
RD /S /Q %2MNT
MD %2MNT
REM Export WIM info into an XML file
ImageX09.exe /info %1.wim 1 %2%1.xml
REM Export WIM image into MNT folder
ImageX09.exe /apply %1.wim 1 %2MNT
REM Remove OSDWinLogon items from registry
ECHO .
ECHO .
ECHO Removing old OSD hooks.
REG LOAD HKLMWIMSYS %2mntwindowssystem32configsoftware
REG DELETE "HKLMWIMSYSMicrosoftWindows NTCurrentVersionWinlogonNotifyOSDWinlogon" /f

REM Remove OSDWinLogon.dll from file system
ECHO .
ECHO OSD registry hooks are gone.
ECHO .
REG UNLOAD HKLMWIMSYS
DEL /F %2mntwindowssystem32osdwinlogon.dll
ECHO Removal of OSD hooks is complete.

REM Capture new WIM image
ECHO .
ECHO Extraction and updating complete, please verify file copy in %2MNT and XML information in %2%1.xml.
PAUSE
ImageX.exe /compress maximum /capture %2MNT %2%1-SCCM.wim %1 %1
ECHO .
ECHO Compression of the WIM is complete.

REM Remove MNT folder and XML file
ECHO .
ECHO Removing MNT folder.
RD /S /Q %2MNT
DEL %2%1-SCCM.wim
DEL %2%1.xml
ECHO .
ECHO WIM Operation Complete

About the Author

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like