Making a Windows 7 All-Editions-in-One Bootable Image

I don't use DVDs or CDs to install operating systems anymore, USB sticks or SD cards are a lot faster, more convenient and more compatible, since slim devices don't come with CD/DVD drives anymore, I don't even have one in my desktop computer. I grew tired of rebuilding different OSes on my flash drives over and over again though, and to stop wearing them out, I've decided to make an all-in-one Windows 7 image. Since I couldn't find a comprehensive guide (there are few, but they still miss some helpful information), I glued them all together and made my own. Just remember, that making of an image must be done on a 64-bit operating system, otherwise you will encounter problems.

Making an Image

Start with copying or extracting the contents of Windows 7 DVDs, both 32-bit and 64-bit architectures, into two separate folders (WIN32 and WIN64 in this example). You can also download images from here, they include latest service packs and other updates. You can open these *.iso images either with an archiver like WinRAR or a drive emulator like WinCDEmu. You also need Windows Automated Installation Kit (AIK), download and install it. For this example, I'm keeping WIN32 and WIN64 folders inside 'D:\NEW' directory, if yours differ, adjust commands' filepaths accordingly. By executing the following commands in a Command Prompt, you will integrate your 64-bit editions of Windows 7 into 32-bit.

Each completed task should report "Successfully exported image #1" (1-4), if everything was done correctly. Error messages are quite clear. You may encounter a couple of them, though most likely they will be a result of a typo. If you enter a wrong filepath it will output 'The system cannot find the path specified' error message; if you accidentally run the same command to integrate one of the editions it will spit out an error message 'Image name [<edition name>] already exists in target file' or it may be a result of a same edition name between the architectures, so just simply put 'x64' at the end of the name in the integration command and that should fix it.

Now WIN32 folder holds 32-bit and 64bit installations. Next, delete ei.cfg in WIN32\sources directory, this file causes to skip edition selection window during a OS setup. And your image is ready. If you want to make a bootable *.iso image, you can easily do this with one command using Windows AIK:

Wait for it to complete and now you should find your new all-editions-in-one Windows 7 image in 'D:\NEW' directory. Or you can copy all the files from WIN32 to a specially prepared USB flash drive, which I'll show you how to make in the next chapter. The image itself is now done, if you want to integrate Windows Server 2008 R2 as well, check out this guide.

Booting Windows Installer from USB Flash Drive

There are at least a couple of tools to make your flash drive bootable, like Windows 7 USB/DVD download tool straight from Microsoft. These tools are easy to use: browse for *.iso image, select a drive and install. Or you can do this manually. Insert you flash drive, open up Command Prompt and enter the following:

Carefully select the disk from the list where you should find your USB flash drive.

If your disk has a drive letter already assigned, you can skip the next step and just exit.

Now you need to copy over a boot code from Windows 7 installation image or disc. Before entering the following command, check the drive letter of your flash drive, in this case I'm using 'e:'.

This filepath may not exist if you haven't been following this guide or already deleted the files, in that case mount your *.iso image of Windows 7 with drive emulator and find bootsect.exe executable there, edit the filepath of the given command, execute it and if there are no errors the drive is now ready. All what is left to do is to copy all installation files from a mounted image or WIN32 directory to USB drive and it's done.