39 posts in this topic

I thought I'd post my guide here also. Every guide I seen online is not detailed and we are all struggling to get things to work with their guides, so I thought I would post a detailed guide here as a contribution to the Neowin Community. If there is anything you'd like to know then leave a message or send me a private message. Cheers to all   :)

 

 

What you need:

  • install.wim image from the Windows installation media. If it is an install.esd image then you have to create a Virtual Machine and install Windows 8.1 on it. I will give instructions. The file is in the ?Sources? folder which is in the Windows Install Media.
  • A batch file called update.bat (Script is on the bottom of this guide)
  • Windows updates downloader: http://www.windowsupdatesdownloader.com/ProgramFiles.aspx
  • Your main computer that you will perform this task on should be Windows 8.1. Install Windows ADK for Windows 8.1 here: http://technet.microsoft.com/en-us/library/dn247001.aspx.  

Instructions:

  1. You need to create a folder and name it whatever you like. Inside that folder you need to create another folder called: patches
  2. Copy your .wim file to the folder you created (NOT the patches folder)
  3. Copy the batch file to the same folder
  4. Now all you need is the updates that you will download from the ?Windows Update Downloader?.
  5. Download the update list from this page: http://www.windowsupdatesdownloader.com/UpdateLists.aspx (It?s a small file). Once finished downloading you need to Double Click it to add the list to the Windows Updates Downloader.
  6. In the Windows updates Downloader, choose the Security Updates, Non-Security Updates and both versions of .Net Framework. All the other updates are optional. All updates MUST be in the .msu format.
  7. Once the updates are downloaded you need to copy and paste all the updates in the ?patches? folder. Make sure that you only copy the updates to the patches folder. In other words, there should be NO folders inside the patches folder. Only .msu (update) files can be in the patches folder.
  8. Now, the Structure of the folder you are working in should have only 3 items: a ?patches folder?, update.bat file and an ?install.wim? file. All .msu updates should be in the patches folder.
  9. Now Right click the update.bat file and choose to run as Administrator. Once it installs all the updates it will ask you to hit any key. Hit any key until is shows all the updates and continues. You will have to hit any key many times until it begins the last phase.
  10. Once it is finish, you can repeat step 7 through 9 for the Windows 8.1 update 1 files (There are 7 needed downloading).
  11. Download and place each update 1 updates in the patches folder. (Make sure all other updates are deleted). Put a number in front of each update by renaming them like I did here:                

1-Windows8.1-KB2919442-x64.msu
2-Windows8.1-KB2919355-x64.msu
3-Windows8.1-KB2932046-x64.msu
4-Windows8.1-KB2937592-x64.msu
5-Windows8.1-KB2938439-x64.msu
6-Windows8.1-KB2934018-x64.msu
7-Windows8.1-KB2959977-x64.msu

  1. Above will insure that the updates get installed in the proper order.
  2. Once everything is finished then you can replace the old .wim file in the Windows install media with the new one.

Convert .esd to .wim using a Virtual Machine:

What you need:

  • Windows 8.1 ISO, DVD or USB stick made bootable with Windows 8.1
  • Microsoft Hyper-V (included as an add-on in Windows 8.1 Pro) or Virtual Box
  • These generic keys are to allow the correct version of Windows 8.1 to be installed. These keys are only to tell Windows what version to install. You will need your own purchased key to activate later.
    • 334NH-RXG76-64THK-C7CKG-D3VPT for Non-Pro version
    • XHQ8N-C3MCJ-RQXB6-WCHYG-C9WKB for Pro version
  • Knowledge of these Virtual machines
  • ImageX which comes with the Windows ADK for Windows 8.1
  • Knowledge of the CMD command prompt.
  • Knowledge of ?SysPrep?

Instructions:

  1. Create a Virtual disk. The disk should be either VHD or VHDX
  2. Install Windows 8.1 in the virtual machine
  3. Press Ctrl + Shift + F3 when the Installation gets to the screen where you create a computer name. This will log you in automatically as the Administrator and start the SysPrep process.
  4. In the SysPrep preparation tool, make sure you choose ?Enter system out of box experience?, and then check the box that says ?Generalize?. The next drop-down menu: choose ?Shutdown?. Click OK and the Virtual machine will shut down when finished.
  5. Now locate where the Virtual Disk that has Windows 8.1 installed on it.
  6. Mount that drive and give it a drive letter
  7. Make sure you installed ImageX which comes with the Windows ADK for Windows 8.1
  8. Click the Start button and type cmd for command prompt. In the search results choose ?Deployment and Imaging Tools Environment?. A command black box will open.
  9. Type the following: imagex /compress maximum /capture F:\ C:\install.wim "Windows 8.1 Pro" (F is the drive letter you gave the virtual drive when you mounted it)
  10. Hit Enter and wait for it to finish.
  11. Look in the C drive and you will also see the install.wim file. This is the file you need to inject all those updates in to.
  12. You can now delete the Virtual drive.

Convert wim to esd:

Once you are finished injecting all the updates, and when the original file was an ESD file then you need to convert it back to an ESD file.

  1. Put the finished install.wim file in the C drive again.
  2. Open an elevated command prompt
  3. Type the following: dism /Export-Image /SourceImageFile:"C:\install.wim" /SourceIndex:1 /DestinationImageFile:"C:\install.esd" /Compress:recovery
  4. Hit the enter key
  5. It will take an hour or so to do this so have patients.
  6. Once it?s done you can replace the original install.esd file that is in the Windows Install disk/ISO/USB stick with the new one.
  7. Congratulations, you are now a master at making your own Windows 8.1 disk with the latest updates. J

Copy text below into a blank text document and name it update.bat

MD %~dp0WIN8

 "c:\program files (x86)\windows kits\8.1\assessment and deployment kit\deployment tools\amd64\dism\Dism.exe" /Mount-Wim /WimFile:%~dp0install.wim /Index:1 /MountDir:%~dp0WIN8

"c:\program files (x86)\windows kits\8.1\assessment and deployment kit\deployment tools\amd64\dism\Dism.exe" /image:%~dp0WIN8 /Add-Package /PackagePath:"%~dp0patches"

"c:\program files (x86)\windows kits\8.1\assessment and deployment kit\deployment tools\amd64\dism\Dism.exe" /image:%~dp0WIN8  /Get-Packages | more

 pause

"c:\program files (x86)\windows kits\8.1\assessment and deployment kit\deployment tools\amd64\dism\Dism.exe" /Unmount-Wim /MountDir:%~dp0WIN8 /commit

1 person likes this

Share this post


Link to post
Share on other sites

Guys, this way is the Microsoft way. Those other GUI tools, well you have no idea what's happening. And they seem to always have bugs. There is no bugs in this way. You get the updates installed and that's it. To make a bootable USB: just use the Windows 7 USB/DVD download tool. Always use your original Windows 8.1 ISO and copy and replace the modified .wim file to the USB stick.

1 person likes this

Share this post


Link to post
Share on other sites

Hmm I'll just stick with my MSDN Windows 8.1 with Update 1 ISO :)

4 people like this

Share this post


Link to post
Share on other sites

This looks like it could be useful, but I'm not sure it would allow Secure Boot to be enabled?

 

I try to stick to network based installs where possible, but sometimes you need to dig out the USB drive.

 

Hmm I'll just stick with my MSDN Windows 8.1 with Update 1 ISO :)

I'm still confused why that ISO made me install Update 1 again from Windows update.

Share this post


Link to post
Share on other sites

Guys, this way is the Microsoft way.

Source?

Share this post


Link to post
Share on other sites

Source?

Um, look at the script commands. They all have DISM commands. Where do DISM command come from? UM they come from the Windows ADK for Windows 8.1. And so does the imageX command.

Share this post


Link to post
Share on other sites

Before you sysprep the image wouldn't it make sense to use DISM to cleanup the WinSXS folder to reduce the size of the WIM?

Share this post


Link to post
Share on other sites

this is nice.

Share this post


Link to post
Share on other sites

Before you sysprep the image wouldn't it make sense to use DISM to cleanup the WinSXS folder to reduce the size of the WIM?

you could do that and that would be a great idea, but most people have ESD files cause they either downloaded the upgrade or downloaded the full version online. When you convert back to ESD, it does what you said automatically.

Share this post


Link to post
Share on other sites

This looks like it could be useful, but I'm not sure it would allow Secure Boot to be enabled?

 

I try to stick to network based installs where possible, but sometimes you need to dig out the USB drive.

 

I'm still confused why that ISO made me install Update 1 again from Windows update.

Microsoft rereleased the Update1. Try and re-download the update and re-inject it and see if that works. And I believe Hyper-V supports secure boot. So see if the Virtual Machine way works.

Share this post


Link to post
Share on other sites

So, would you happen to possibly have a write up or know where I can get one for the Microsoft Development Toolkit, more specifically the part for the actually capturing of an image? I am having a heck of a time trying to capture a Server 2008 R2 image so that it deploys correctly.

Share this post


Link to post
Share on other sites

Later this month they are going to be releasing the ISO's with the update 1 update for the Upgrade to 8.1 product key only. This works for the retail version. For those who are doing the 8.0 to 8.1 store upgrade the 8.1 update is now included in that.

 

Lastly I am trying to see why the VM is even needed at all. You should be able to add the updates straight into the install.wim file with Dism. As far as the install.esd image imagex can read these but Dism can't. So you could do an apply to a blank folder or vhf file with imagex. From there you can recapture to a wim. There is no need to install Windows to do any of this.

Share this post


Link to post
Share on other sites
Type the following: imagex /compress maximum /capture F:\ C:\install.wim "Windows 8.1 Pro" (F is the drive letter you gave the virtual drive when you mounted it)

ImageX is deprecated and you should be using DISM to both capture and service WIMs

1 person likes this

Share this post


Link to post
Share on other sites

you could do that and that would be a great idea, but most people have ESD files cause they either downloaded the upgrade or downloaded the full version online. When you convert back to ESD, it does what you said automatically.

No it doesn't ESD format is just highly compressed. You basically get significantly more compression than you get using the max option on DISM. The cleaning up of WinSxS folder and such removes updates that got superseded by the newer updates. However if there are updates that need a reboot it won't allow the command to start. The only time I cleanup the folder like this is if I make a full system image that is the OS with apps and such. At that point space is at a premium so I would definitely need to the ESD thing.

ImageX is deprecated and you should be using DISM to both capture and service WIMs

While it is deprecated, its the only way to export ESD files without having to do an install of Windows.

Share this post


Link to post
Share on other sites

Guys, this way is the Microsoft way. Those other GUI tools, well you have no idea what's happening. And they seem to always have bugs. There is no bugs in this way. You get the updates installed and that's it. To make a bootable USB: just use the Windows 7 USB/DVD download tool. Always use your original Windows 8.1 ISO and copy and replace the modified .wim file to the USB stick.

I think a better "Microsoft" way is to utilize MDT 2013 and use a simple build and capture sequence and enable the Windows Update step to get all the latest patches.

There are many ways to skin a cat, however...

You could also just download the Windows 8.1 with Update 1 ISO from Volume LIcensing or MSDN, they're both available.

1 person likes this

Share this post


Link to post
Share on other sites

No it doesn't ESD format is just highly compressed. You basically get significantly more compression than you get using the max option on DISM. The cleaning up of WinSxS folder and such removes updates that got superseded by the newer updates. However if there are updates that need a reboot it won't allow the command to start. The only time I cleanup the folder like this is if I make a full system image that is the OS with apps and such. At that point space is at a premium so I would definitely need to the ESD thing.

 

IMO no point even going into audit mode until they have completed installing and configuring.

Share this post


Link to post
Share on other sites

I think a better "Microsoft" way is to utilize MDT 2013 and use a simple build and capture sequence and enable the Windows Update step to get all the latest patches.

There are many ways to skin a cat, however...

You could also just download the Windows 8.1 with Update 1 ISO from Volume LIcensing or MSDN, they're both available.

Actually I wrote this guide for people who DON'T have a volume License and who DON'T have a MSDN subscription. SO please, I reiterate, this Guide is NOT for those who have MSDN subscription and Volume Licenses. Also the Windows Assessment and Deployment Kit (ADK) for Windows 8.1 seems to do better with Wim images that come from the install disk and for people who don't have other computers but the one they are using. Also setting up a Hyper-V virtual machine and sysprepping it is allot easier.

Share this post


Link to post
Share on other sites

IMO no point even going into audit mode until they have completed installing and configuring.

If you know how to clean up the Winsxs folder without starting up the machine that we are injecting the updates in to, then please let us know the easiest way to do that. I'm all ears and eyes. And if you can add it to the script I posted then that would be what I am looking for.

Share this post


Link to post
Share on other sites

No it doesn't ESD format is just highly compressed. You basically get significantly more compression than you get using the max option on DISM. The cleaning up of WinSxS folder and such removes updates that got superseded by the newer updates. However if there are updates that need a reboot it won't allow the command to start. The only time I cleanup the folder like this is if I make a full system image that is the OS with apps and such. At that point space is at a premium so I would definitely need to the ESD thing.

While it is deprecated, its the only way to export ESD files without having to do an install of Windows.

so, What is the easiest way to decompress an ESD file? Basically ESD to WIM?

Share this post


Link to post
Share on other sites

If you know how to clean up the Winsxs folder without starting up the machine that we are injecting the updates in to, then please let us know the easiest way to do that. I'm all ears and eyes. And if you can add it to the script I posted then that would be what I am looking for.

dism /image:c:\mount(where mount is where you mounted the folder) /cleanup-image /startcomponentcleanup /resetbase This only works if the updates don't need a restart of the system.

Share this post


Link to post
Share on other sites

do you remember the /integrate flag from windows XP to integrate servicepacks and updates?

 

I just want to cry when I see how difficult and user-unfriendly it is today.

Share this post


Link to post
Share on other sites

do you remember the /integrate flag from windows XP to integrate servicepacks and updates?

 

I just want to cry when I see how difficult and user-unfriendly it is today.

I totally agree with you there. MS promised they would make this process easy when we had the first SP in vista but its gotten significantly worse with each version of Windows. If we ever got it as easy as it was in XP I would be ok with building images all day long.

1 person likes this

Share this post


Link to post
Share on other sites

do you remember the /integrate flag from windows XP to integrate servicepacks and updates?

 

I just want to cry when I see how difficult and user-unfriendly it is today.

 

Ha I was just thinking the same thing! I remember when Vista was in development and Microsoft were saying how easy it would be to build images with all the updates rolled in. This is just a horrible mess. A simple unattended install file or sysprep was all you needed back then. So glad I moved away from system administration if this is what life is like now!

Share this post


Link to post
Share on other sites

If you know how to clean up the Winsxs folder without starting up the machine that we are injecting the updates in to, then please let us know the easiest way to do that. I'm all ears and eyes. And if you can add it to the script I posted then that would be what I am looking for.

 

dism /online /cleanup-image /startcomponentcleanup /ResetBase (reset base only works on 8 and 8.1). Would recommend doing this before putting the machine into audit mode

 

After update 1 leaked this command saved me about 8 gigs of disk space.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.