Windows 7 ISO Creation

I have a real quick question.

I am rebuilding my Windows 7 install USB. I am using this guide to slipstream the new "Convenience Rollup" update into the ISO so it'll have as many updates as possible already installed when I use it.

I made my ISO so that it lets you choose which version of Windows 7 to install. During this slipstream process you have to choose one version. So my question is this: Do I have to do this process to each version in turn? If I do this process to just the "Professional" version, will all the other versions not have the updates?

I don't know if any of that even makes sense.

Basically, do I have to do this process for Professional, then start over and do it again for Home Premium, then start over again and do it for Ultimate? Or will doing it for just one version pass it on to all the other versions.

If I understand your question correctly, you are asking if you need to download and apply updates for every version of Windows 7 included in your ISO. From the article you linked, it only specifies different architecture for rollup updates (x64 or x86 bit) so I would assume that this applies to any version of Windows 7 SP1 with same architecture.

Assuming that Step3. is where the instructions just tell you to choose which version you want to install.

As far as i know, you only have to slipstream the updates once.

Yeah, we'll see when I have to install one of the other editions. I just did it to Professional, as I use that one the most.

Right now, though, I am having one heck of a time booting the USB drive. Every time click "Install Now" I get the "A required CD/DVD drive device driver is missing" error. I put a bunch of drivers for my motherboard (USB, SATA/AHCI) on the USB drive and it doesn't find them. Anyone know what I'm doing wrong? I remember having this problem (multiple times), but I can't remember what I did to get past it.

Are you trying to install Windows7 on a nvme ssd?
Also you have to point the installation to the requested drivers manualy i think.

Nope, just a normal SATA SSD.

You're going to want to run as close to vanilla windows 7 as you can get to avoid any windows 10 crap and any additional spyware Microsoft has added

1 Like

Yeah, all this drive is going to be for is testing. Mostly for overclocking. Linux is my main OS.

So, this is really starting to be frustrating.

No matter what I do, no matter which settings I adjust in the UEFI, no matter what I turn off or on, I just can't get past that driver selection screen. I can't even browse a USB drive to pick the driver, it doesn't see the USB drive I used to boot from, or a separate one that I put the drivers on.

Anyone have any suggestions? At this point I am basically going to have to make an 8.1 Enterprise install USB and just use it temporarily for testing, as I don't have any 8.1 keys at all. I really wish 7 would work.

Windows Imagine Format (.wim) files store each edition via unique indexes and the files are deduplicated internally. In other words, updating one edition (index) will not update the others. I would be very very surprised if it did, and consider it a bug.

Part of the reason I have not done what you're trying is because the way to do it is to capture the changes made to each edition as seperate .wim files and then reintegrate them manually one by one, otherwise the size of the .wim file becomes ridiculous very quickly because .wim files do not transparently remove old/unused files.

Okay so UEFI:
So just some compatibility stuffs to keep in mind going forward. Without going into the gory details of why... you are using Windows 7 x64 Professional/Enterprise or Ultimate right? Windows 7 32-bit versions and also Home Premium/Basic (either architecture) will not work with UEFI natively (require either compatibility hacks or a CSM). If using a 32-bit version, or either of the editions above, then you activated the CSM right? Right?

Next is the Windows PE drivers:
So not every version of Windows PE has storage USB/SATA drivers for every motherboard. Sometimes you get a PE version that boots but then does not recognize the local devices when the WinPE's OS takes over control for the devices from the firmware.

There's like...fixes for that, that involve integrating the USB drivers directly into the WinPE image. Just mount the winPE.wim image and integrate the WinPE version and architecture specific drivers using the DISM tool. But like...why...

It's lazier to instead just use a different version of PE and see if that one works, and if that version of PE doesn't work, then use a different one and so on.

Honestly, the GUI provided by setup.exe is pretty terrible. Half the time, when running non-standard configurations it will just fail for random reasons even though the image is valid. This is especially true when using weird combinations of versions of setup.exe with arbitrary .wim images. It just doesn't detect properly so I stopped trying to work with it a long time ago.

My recommendation is that, once you can get the storage devices detected (check if they are detected using diskpart), to then use diskpart to format the disk, the DISM tool to apply the image manually and bcdboot to make the image bootable using whatever bootmode you decided on (either BIOS or UEFI).

Uh... enough theory. Here's some vague instructions:

  1. Create a WinPE v4/5 bootable USB drive (recommended: use RUFUS)
  2. copy your Copy C:\Users\admin\Downloads\Win7files\sources\install.wim to the flash drive
  3. Boot target system using specified USB drive
  4. Shift+F10 to bring up a command prompt
  5. Check if storage devices have been detected properly (cd C: cd D: cd E: cd F: ... and list disk in diskpart.exe
  6. format disk using diskpart UEFI: https://technet.microsoft.com/en-us/library/hh825686.aspx and BIOS: https://technet.microsoft.com/en-us/library/hh825677.aspx
  7. Apply the image using DISM to the target partition (adjust letters appropriately)
    Syntax: dism.exe /Apply-Image /ImageFile:X:\install.wim /Index:1 /ApplyDir:D:\
  8. Make the image bootable using bcdboot (again with the letters):
    Syntax: bcdboot c:\windows /s S: /f ALL
  9. Reboot computer

Good luck.

First off, thank you very much for the knowlege and advice.

I got all the way to step 7 and got an error. DISM comes up with code 87 and "The apply-image option is unknown."

After some quick research this supposedly happens when DISM is an older version. The version I am using is 6.1.7600.16385. According to this link the version I have does not have the apply-image command available. What would be the easiest, fastest way to get a newer version of DISM?

So,

  • you checked the drive letters C:, D:, E: F: and used diskpart to enumerate the disks to make sure the storage controllers were detected and installed properly right?
  • And then followed the instructions at https://technet.microsoft.com/en-us/library/hh825686.aspx right?
  • And you're very sure you booted in UEFI mode not BIOS mode right?
  • And you're very sure about the target drive letter to deploy to?
  • And you know exactly where the x:\install.wim to deploy from is located right?
  • And the index of the image inside the .wim container right? Right?

This version number is Windows 7 without service pack 1, e.g. Windows 7 RTM which corresponds to WinPEv3. The option /apply-image was introduced into dism tool with version 6.2.x corresponding to Windows 8 RTM, which correspond to WinPEv4. While it is possible to update the tool and use the newer syntax, using the older syntax with the imageX tool accomplishes the same task. DISM and ImageX do the same thing in that they are both front-ends for the same code, but use different syntax.

imagex /apply N:\Images\myimage.wim 1 C:

Edit: Now that I think about it, the bcdboot tool was not updated until WinPE v4 to support UEFI very well. I've always used the newer version of the tool to make older OS's, like Win7 UEFI boot and I'm not sure the older RTM version of bcdboot can do that. MS's documentation from that time period is vague on the issue since they recommend using setup.exe and answer files (eww).

So, the older syntax doesn't have the /f switch. Syntax: bcdboot c:\windows /s S:

If the image isn't bootable after applying it, then you will have to either:

  • switch the boot mode to BIOS in your UEFI by activating the CSM + reformat the disk to switch the partition table format from GPT to MBR (as per MS's instructions) or
  • use WinPE 4+ or
  • just update the bcd/dism tools themselves.

I am pretty positive that the SSD was assigned drive letter W: When I did list disk in diskpart the SSD was the only one that showed up. To be honest I am not sure what drive letter the flash drive is. X: seems to be... something. "Windows" is on it.

That said, I was able to format the SSD using GPT using the link you mentioned.

Yup. The flash drive booted using UEFI mode.

As I said above, W: seemed to be the assigned letter because that is what I set it to during formatting.

Not really, no. When I go to the root of X: and do dir there are no files. Just three directories: Program Files, Users, and Windows. How do I make it show all the drives and their corresponding letters?

Not sure what this means.

I think to get past the GPT old version of DISM I will have to get a newer PE. Not sure where to get it.

Unfortunately at first glance I have no idea why you're having those boot issues.
What system is this? If Skylake then installing Windows 7 from USB takes a bit more effort and you'd need to include the USB3.0 drivers.

But regarding integrating updates to the installation media, while you're at it you should integrate more updates than just the convenience rollup.
For example the update rollup's released since the Convenience Rollup. And why not throw in the latest Servicing Stack Update as well.

Here's all the appropriate links
May 2016 https://support.microsoft.com/en-us/kb/3156417
July 2016 https://support.microsoft.com/en-us/kb/3172605 (incl. June 2016)
August 2016 https://support.microsoft.com/en-us/kb/3179573
September 2016 https://support.microsoft.com/en-us/kb/3185278
Servicing Stack Update September 2016 https://support.microsoft.com/en-us/kb/3177467

Especially the July rollup is important as it fixes issues with the Windows Update spending hours, upon hours searching for updates but never finding anything. I ran into that the other day on a laptop reinstall and it took me far too long to realise what was wrong with it and how to fix it. Now you know.

X refers to a wildcard usually. But actually, in WinPE terms, X: is the root of the drive for the ramdisk that was loaded from the WinPE image. It does not represent the flash drive location. Letters are dynamic and Windows will automatically assign flash drives the first available letter after assigning letters to all physical disks. Sorry for the confusion. Flash drives are usually D, E or F. If the root of the flash drive is C: then there was no disk partition that qualified to me mounted found (so go into diskpart and format it properly).

So the primary issue you are running into over and over seems to be that the USB controller the USB drive is connected to is not getting installed when WinPE boots up. Considering you can format the SSD, that implies you're using a keyboard, and that is likely to be a USB one and that implies there is a second USB controller on your motherboard that is getting detected properly.

This is actually a pretty mundane issue. Normally enterprises solve it by integrating the motherboard's storage drivers directly into the WinPE image. Obtain the raw .inf driver files for your storage devices (especially the USB 3.0 controllers) from your motherboard manufacturer for the appropriate WinPE image (3,4,5,10) and also the target OS (7,8.1,10).

dism /mount-wim /wimfile:C:\winpe31.wim C:\mount
dism /image:"c:\mount" /add-driver /driver:"C:\drivers\Dell\usb30_drivers\" /recurse
dism /unmount-wim /mountdir:c:\mount /commit

You can obtain winPE.wim files from the ADKs or from a windows installer disk.

Recommended: A much easier workaround is to try plugging in the flash drive into the USB port the keyboard and/or mouse are currently connected to. The idea is to avoid using the USB controller that isn't getting installed (usually USB 3.0 ones) and to use the one that is (usually the 2.0 ones). Then you can try plugging in the keyboard to each USB port until it works.

Another workaround, again to avoid installing the ADKs and integrating the drivers, is to use a different version of WinPE. Sometimes the WinPE for Win7 (v3) will not work on a system without integrating drivers but another version like the Win10 PE will work normally. If you have a Windows 8, 8.1, or 10 install disk, it's worth a shot.

If you want to go "all out," I did create some scripts to download and install various ADKs and auto-generate WinPE files for use in flash drives a while back if interested. It also contains some logic/tools to help with the installation of drivers onto the PE images. https://forum.teksyndicate.com/t/adk-tools-usb-installer-for-windows/101338 Requires like 30GB of space and I recommend using a dedicated VM.

To check disks and volumes using diskpart:

diskpart
list disk
sel disk 0
list part
list volume

So Disk 0 is a physical disk with an MBR partition table with 1 partition drive assigned letter C:. It also has a second smaller Fat32 formatted Removable drive (a.k.a. A USB drive) assigned letter F: Type "Help" in diskpart for more info, especially "assign help" to assign temporary letters to partitions. Again, letters are assigned dynamically.

If you put the drivers on the USB drive and successfully deploy the image to the disk, it is possible to integrate those pesky USB drivers to the deployed image using the same command that integrates them into the winpe image:
dism /image:"c:\" /add-driver /driver:"F:\drivers\Dell\usb30_drivers\" /recurse

Edit:

Take a look at the command on step 3 of your guide and the picture output.
Dism /Get-WIMInfo /WimFile:C:\sources\install.wim

It lists the independent file streams by indexes and name that are present in the .wim container. When you mount the image in step 5 (either by referencing the exact name or index) it mounts one of those file streams, which you can then update, independently of the other streams.

After committing the changes, you will need to reference that same index in the dism /apply-image command or in the imagex /apply command. If you reference a different index than the one you modified, then it will not apply the correct edition.

Then you shouldnt need drivers for that.
Make sure that the sata configuration for the SSD in the bios is set to ahci mode.

I haven't abandoned this. I am determined to get this to work. I am not going to give up my Windows 7 keys just yet. Been busy all week with work stuff.

So, some info on the target system(s). Yes, the main system I am working on is Skylake based, an Asus Z170-A. The other system I need to install Windows 7 on is an MSI 100-series motherboard, also Skylake based.

I looked into it a bit and it's apparently very difficult to get Windows 7 to install on any 100-series motherboard. I was researching ITX motherboards and came across this guide from asrock: http://www.asrock.com/microsite/Win7Install/ Apparently the Intel 100-series chipset removed the Enhanced Host Controller Interface, which makes the USB ports not work properly and causes Windows 7 to wig out.

On the Z170-A board the keyboard is PS/2. It doesn't matter what USB port the flash drive is in, it doesn't show up. I tried all the 2.0 ports. Gotta be what I said above, Windows 7 has no idea what's going on because of the removed controller or whatever. It's funny, because in the UEFI of my new MSI ITX board there's an "install Windows 7" setting that you enable to help install it, but it didn't do anything.

So, I am going to make a new WinPE image based off either 8.1 Enterprise or 10 Pro and see what happens. If that doesn't work I will attempt to integrate USB drivers.

edit: After thinking about that last bit I asked myself if that'd work. Would an 8.1 based PE boot disk be able to transfer a Windows 7 image to the SSD?

This is exactly what I needed.

I tried several different modified install.wim files, and they all caused all sorts of errors. One with updates rolled in, one with updates and drivers rolled in. The first time I did it I applied the image with Index 1, which turned out to be Windows Home Basic. I figured out that I needed to use Index 3 for Professional pretty quick. I did a lot (a lot a lot) of unpacking and packing of the install.wim file. All day long.

But I just kept hitting one roadblock after another. Eventually I said screw it and tried a bone stock, completely unmolested install.wim file and it worked. Except, of course, I couldn't plug a flash drive in to install drivers. So I integrated only USB drivers for the two motherboards I will be using. Bang, Windows installed and started right up, and my flash drive was recognized.

I really would have liked to have been able to roll all the updates into the image, but that was one of the times where it flat out broke the image. It applied to the drive fine, but when I booted to it it got hung up on "applying system settings," eventually throwing this weird message basically telling me to reinstall Windows. It would then do that same thing over and over on each boot, essentially stuck in a boot loop where I had to click the OK button each time.

Thanks @Lagittaja for the links to the update files. Since I couldn't get them to roll into the image I am installing them manually on each system before I even connect them to the internet. It isn't that much of a hassle since it's only two systems, but I can see where if I needed to do more it would be handy to have them integrated. I have seen the horrible update process first hand. So far installing the ones you listed as well as the couple I already had have helped a lot. Updating is going a ton faster now.

And thanks @Peanut253 for all your help. You are very knowledgeable in this and I will be saving all the information here for future reference. I am glad I stuck it out and learned something new.

By any chance, is the flash drive or port USB 3?

Nope. I tried both 2.0 and 3.0 ports, but attempted to use the 2.0 ports the most. And all my flash drives are 2.0.

It's strange, because with the bone stock install of 7 SP1 the USB keyboard and mouse worked, but nothing else worked in any port. I had to integrate the USB drivers into the image to get them to work. After doing that I was able to install the rest of the system drivers as well as the update packages. Then I connected the system to the internet and let it download the remaining updates.