For every installation of Windows Vista, you need an image in the WIM format. One great feature of WIM images is that you can mount and inject them with device drivers or other files. In this post, I will be explaining how to mount an image in a WIM file with ImageX. ImageX is the tool for capturing and applying images. But it can also be used to modify an image. This article is based on Windows Vista Beta 2.
- Pip install Boto3 - Thu, Mar 24 2022
- Install Boto3 (AWS SDK for Python) in Visual Studio Code (VS Code) on Windows - Wed, Feb 23 2022
- Automatically mount an NVMe EBS volume in an EC2 Linux instance using fstab - Mon, Feb 21 2022
ImageX is part of the Windows Automated Installation Kit (WAIK) , which is a part of Business Desktop Deployment (BDD 2007). You can download it at Microsoft Connect . After installing BDD 2007, you have to install WAIK. You find the WAIK installation folder in the BDD Vista folder. There is the WAIK setup file for every CPU type. For a 32-bit Intel CPU you can start waikx86.msi, for example.
To be able to mount an image, you have to install the WIM filter first. Start the Windows Explorer with Administrator rights. To do so, you have to right click on its icon. Then, go to C:\Program Files\Windows AIK\tools. There, you can choose the correct folder for your CPU type. To install the WIM filter, right click on wimfltr.inf and then click on "install". Now, you have to reboot.
You will find the ImageX tool in the same folder as wimfltr.inf. As it is command line tool, you have to open this folder on the Command Prompt. Don't forget to start the Command Prompt with Administrator rights.
Before you can mount an image, you have to find out the image number within the WIM file since it can contain more than one image. The WIM file of my Windows Vista Beta 2 DVD contains seven images; for every Windows edition, one image. Enter "imagex /info img_file", where "img_file" represents the location of the WIM file. You should see now the description of the WIM file as an XML file. The name of the tag for the image number is IMAGE INDEX.
One last step is necessary before we can finally mount the image. Create a new folder where the image shall be mounted. This is the image path. Now, you can mount the image:
imagex /mount img_file img_number img_path
With this command, you only have read access to the image. If you want to inject a device driver or a file, you also need write access. The command for this looks like this:
imagex /mountrw img_file img_number img_path
Once you've modified the image you can unmount it with this command:
imagex /unmount /commit img_path