Before creating the WIM file, it’s recommended that you boot into the Windows PE environment.
The following command can be used to build and compress a drive. D:\ is used as the WINPE boot disc uses C:\
imagex /compress maximum /capture D:\ C:\install.wim "Windows 7 SOE 1.0"