System Administration

How To Image A Computer With Windows 10 Using dism

If you want to image a lot of computers with a clean Windows 10 image, Microsoft  has lots of built-in tools to help do this, but it’s easy to get lost and overwhelmed with their documentation.  To alleviate that headache, I will explain step-by-step how to:

  • create and use an Unattended.xml file that will:
    • skip the initial setup screens
    • create a local admin account
    • activate Windows with a product key
    • (optionally) configure other Window settings
  • capture a deployable Windows 10 .wim file using sysprep
  • deploy the image to multiple computers using the dism command line tool and WinPE
  • (optionally) add drivers to the .wim file

High-level Overview

I often found myself getting lost while trying to make a universal Windows 10 .wim image file, so in this section I will give a broad overview from start to finish of the steps needed to be completed.  This will also lay out the structure of this article.

  1. Install the Windows Automated Deployment Kit (ADK)
  2. Acquire a Windows 10 installation disc or .iso
  3. Create an Unattended.xml answer file
  4. Install Windows 10 on a spare computer
  5. Copy the Unattended.xml file to the spare computer
  6. Run sysprep.exe using the Unattended.xml file
  7. Create a WinPE disc or bootable USB drive
  8. Boot the computer to WinPE after it shuts down
  9. Capture the image to a .wim file using dism
  10. Deploy the image to a computer using dism

Install The Windows Automated Deployment Kit

Download and install the Windows 10 ADK.  You can just accept all the defaults the installer offers.  You mainly need the Deployment Tools, but the other stuff that is pre-selected will be useful for some other projects, so keep them selected.


Acquire A Windows 10 Installation Disc Or .iso

You will need some form of a Windows 10 install media.

Create An Unattended.xml Answer File

You will need to create an answer file, which contains the settings you want to be applied at the time you deploy the image to a computer.  There are many to choose from, but this article will walk though some basic ones that many organizations might use.

Copy install.wim To Your Desktop

Before you can make an answer file, Windows needs to know what sort of answers can be applied.  It finds this information from install.wim, which is located at the root of the installation disc.  Copy it to your Desktop since it cannot be read directly from the CD or .iso.

Use install.wim To Generate Some Categories To Answer

  1. Open Windows System Image Manager as an administrator
  2. Right-click in the lower-left corner
  3. Choose Select Windows Image…w10-answer-file-select-wim.png
  4. Navigate to your Desktop
  5. Open install.wimw10-answer-file-choose-wim1.png
  6. Choose Yes on the dialog that appearsw10-answer-file-create-catalog.png
  7. Right-click in the top-right section
  8. Choose New Answer File…w10-new-asnwer-file.png
  9. Stretch the windows and panes so they are easier to readw10-answer-file-strech-window.png

Begin Adding Answers To Your Answer File

Hard Drive Partitioning

  1. Right click amd64_Microsoft_Windows_Deployment_neutral
  2. Choose Add Setting to Pass 4 Specialize…deployment-4-specialize.png
  3. Expand amd64_Microsoft-Windows-Deployment-neutral within the Answer File pane
  4. Highlight ExtendOSPartition
  5. Set Extend to trueextendospartition-true.png

Computer Name, Product Key, Time Zone

  1. Right-click amd64_Microsoft-Windows-Shell-Setup_neutral
  2. Choose Add Setting to Pass 4 Specialize…
  3. Highlight amd64_Microsoft-Windows-Shell-Setup under the Answer File pane
    1. Set ComputerName to %COMPUTERNAME%
    2. Set ProductKey to your Windows 10 product code
    3. Set RegisteredOrganization to your company’s name
    4. Set TimeZone to Central Standard Time (or whatever time zone you are in)shell-setup.png

Join A Domain

  1. Right-click amd64_Microsoft-Windows-UnattendedJoin_neutral
  2. Choose Add Setting to Pass 4 Specialize…unattendedJoin-pass4.png
  3. Expand amd64_Microsoft-Windows-UnattendedJoin_neutral in the Answer File pane
  4. Expand Identification
  5. Set JoinDomain to the name of your domainjoindomain.png
  6. Highlight Credentials
  7. Set Domain to your domain
  8. Set a username and passworddomain credentials.png

Set System Locale

  1. Right-click wow64_Microsoft-Windows-International-Core
  2. Choose Add Setting to Pass 7 oobeSystem…international-core-pass7.png
  3. Highlight wow64_Microsoft-Windows-International-Core in the Answer File pane
    1. Set InputLocale to en-US (or your country code)
    2. Set SystemLocale to en-US
    3. Set UILanguage to en-US
    4. Set UserLocale to en-USset-locale.png

Set The Out Of Box Experience (Bypass Setup Screens) And Create A Local Admin Account

Microsoft-Windows-Shell-Setup (again on a different Pass)
  1. Right-click amd64_Microsoft-Windows-Shell-Setup_neutral
  2. Choose Add Setting to Pass 7 oobeSystem…shellsetup-pass7.png
  3. Expand Microsoft-Windows-Shell-Setup_neutral in the Windows Image pane
    1. Right-click OOBE
    2. Choose Add Setting to Pass 7 oobeSystem…oobe-pass7.png
  4. Expand Microsoft-Windows-Shell-Setup_neutral in the Answer File pane
  5. Highlight OOBE
    1. Set HideEULAPage to true
    2. Set HideLocalAccountScreen to true
    3. Set HideOEMRegistrationScreen to true
    4. Set HideOnlineAccountScreens to true
    5. Set HideWirelessSetupInOOBE to true
    6. Set NetworkLocation to Work
    7. Set ProtectYourPC to 1
    8. Set SkipMachineOOBE to true
    9. Set SkipUserOOBE to trueoobe-bypass.png
  6. Expand UserAccounts in the Answer File pane
  7. Right-click LocalAccounts
  8. Choose Insert New LocalAccountinsertnewaccount.png
  9. Highlight LocalAccount
    1. Set Description to Local admin account
    2. Set DisplayName to a username of your choosing
    3. Set Group to Administrators
    4. Set Name to the same as the usernamelocaladminaccount.png
  10. Expand LocalAccount
  11. Highlight Password
    1. Set Password to a password of your choosingset-password.png

Save Your Answer File

Save your answer file somewhere safe (preferably on a network share).  You will need to copy it to a different computer later on.

Install Windows 10 On A Spare Computer

Now you need a spare computer that you can install Windows 10 on.  You can customize Windows after it is installed (the settings will be captured and applied when you deploy the image), but it’s usually safer and a better practice to apply any settings through the answer file.

It’s easier to add customizations to a clean image rather than one that has already been customized, so I recommend leaving everything at the default and just moving on to the next step.

Copy the Unattended.xml File to the spare computer

Copy your Unattended.xml answer file from the previous step into C:\Windows\System32\Sysprep.

Run sysprep.exe using the Unattended.xml file

Open an administrator command prompt and enter these two commands:

cd C:\Windows\System32\Sysprep
sysprep.exe /generalize /oobe /unattend:Unattended.xml /shutdown

This will apply your answer file and shutdown the computer.  The next time you start it up, it will be as if you just deployed it to a new computer so it will apply all your answers and do a fresh install.  So it is important that you do not start the computer until you are ready to boot it into WinPE to capture the image (in a state before it has been booted).

Create A WinPE Disc Or Bootable USB Drive

Remember, the computer you just installed Windows on needs to stay powered off until this disc gets created.  So you should be running these commands from the computer you installed the WADK on.

  1. Right-click the Deployment and Imaging Tools Environment
  2. Choose Run as administratordeployment-imaging-tools.png
  3. Enter the following commands

The command below will copy the WinPE files to the hard drive so you can (optionally) customize them, but for this guide, leave everything as it is.

copype amd64 C:\WinPE

Next you can do one of two things:

1. make a bootable USB drive:

MakeWinPEMedia /UFD C:\WinPE F:

2. make an .iso file, which you can burn to a CD:

MakeWinPEMedia /ISO C:\WinPE C:\WinPE\WinPE.iso

If you made the .iso, you will need to burn it to a physical disc.  If you made the USB drive, you can move just move on to the next step.

Boot The Computer To WinPE After It Shuts Down

Now that you have either a bootable CD or USB drive that has WinPE installed on it, you need to boot the test computer to that.

Capture The Image To A .wim File Using dism

Insert the CD or USB stick into the computer you ran sysprep on.  You will need to boot to one of these devices (instead of the hard drive).  This can be adjusted in the BIOS, but there is also sometimes a function key you can press that lets you choose what device to boot to on-the-fly.  It’s different for every machine, but if you are reading this far, you probably know how to do this.

Once booted into the WinPE environment, you will be presented with a command prompt.  You will need to run the following commands to capture the image.

First, open the diskpart program


Your prompt will change and the commands you enter now will be for assigning a drive letter to the partitions so you can capture them into an image file.

First, select the disk

select disk 0

Select the first partition (the small reserved partition Windows creates) and assign it a letter

select partition 1
assign letter=r

Next, select the main Windows partition.

select partition 2
assign letter=c

You will now return the regular command prompt.  You can now use the dism tool to capture the images.

It’s most useful to save the image to a network share, but you can save it to another USB drive attached to the computer.  So first, mount a network share and assign it a drive letter.

net use j:\ \\server\share /user:username "password"

Now, you can save both partitions to their own image file:

Dism /capture-image /imagefile:j:\w10reserved.wim /index:1 /ApplyDir:r:\
Dism /capture-image /imagefile:j:\w10.wim /index:1 /ApplyDir:c:\

Deploy The Image To A Computer Using dism

Deploying the images is a similar process, but you will be using diskpart to wipe the hard drive so you can deploy a fresh image.

Run these commands (once you are booted into WinPE) to deploy the image:

select disk 0
create partition primary size=500
select partition 1
format quick fs=ntfs
assign letter=r
create partition primary
select partition 2
format quick fs=ntfs
assign letter=c
select partition 1
net use j: \\server\share /user:username "password"
Dism /apply-image /imagefile:j:\w10reserved.wim /index:1 /ApplyDir:r:\
Dism /apply-image /imagefile:j:\w10.wim /index:1 /ApplyDir:c:\
copy /Y j:\SetupComplete.cmd c:\windows\setup\scripts\SetupComplete.cmd

Notice the last two commands (these optional).  You can create and store a file on the network share named SetupComplete.cmd, which will run when the computer is finished being imaged.

I typically just put one command in it, which removes the Unattended.xml file (sensitive information in this file is already obfuscated, but it’s nice to remove it anyway).

del /f %windir%\system32\sysprep\unattended.xml

Note that you can build this file into the image, but this method is more useful if you want to change the commands that run at first boot.

Now, just type wpeutil reboot and your computer will start up to a fresh install of Windows!

(Optionally) Add Drivers To The .wim File

You may find that some computers need a special network driver or storage driver to complete the imaging successfully.  If this is the case, you can add a driver to image.  Be careful not to add too many or the image will get too big and won’t load since it runs from RAM.

Go back to the step where you copied the WinPE files to the C:\ drive.  Now, instead of creating the install media (and .iso or USB drive), run this command instead to mount the image to the local filesystem:

Dism /Mount-Image /ImageFile:"C:\WinPE\media\sources\boot.wim" /index:1 /MountDir:"C:\WinPE\mount"

Then, add your driver (replace the file path with the path to your required driver):

Dism /Add-Driver /Image:"C:\WinPE\mount" /Driver:"C:\Somefolder\driver.inf"

Now, commit your changes and unmount the image:

Dism /Unmount-Image /MountDir:"C:\WinPE\mount" /commit

You should now be able to create your media same as before:

1. make a bootable USB drive:

MakeWinPEMedia /UFD C:\WinPE F:

2. make an .iso file, which you can burn to a CD:

MakeWinPEMedia /ISO C:\WinPE C:\WinPE\WinPE.iso

85 replies on “How To Image A Computer With Windows 10 Using dism”

When I try to ACTIVE a partition I get “The selected disk is not a fixed MBR disk.” ACT command can only be used on fixed MBR disk. Not sure if this matters but my windows 10 enterprise boots with UEFI and I checked regedit my WinPE is booted in UEFI.

Did I miss a step?

No, you didn’t. Simply, uefi systems (talking about especificly in Windows environment) don’t work with MBR partitioning scheme, only with GPT. This means that you simply don’t need to activate de partition. Bypass this step, only.

Is it necessary to use 2. computer to apply answer file and capture there ie. isn’t there a way to configure a image offline in one of microsoft kits and save it to image file after configuring? Thanks for great guide!

Yeah, you can make a CD and boot to that using a single computer. In large environments though, it is typically easier to use a network share since it scales better.

With Windows 10 UEFI do you only need to capture the C: and R: partiton and then re-create those when it is time to deploy image to new computer, or are there other partitons I should be making and capturing/deploying?

I haven’t done it yet on an UEFI computer, but I know you need a different script for it…trying to find it in Microsoft’s KB may take a while.

Do you have a screenshot? I’m not sure what Windows 10 on 1 means. If you’re using dism, the image should just be applied automatically; there’s no real restore happening–you are deploying a generic image that is built up when you start the computer.

So you are getting the option of booting up into “Windows 10” and then the option for “Windows 10”. So two of them correct? One will boot fine and one won’t Correct? This is how I fixed it.

Run cmd prompt as admin, type bcdedit enter. This will give a detailed list of all operating system entries currently in the bootmgr.dll. Write or copy the alphanumeric string to the right of “identifier” for the entry you wish to delete.

Type the command “BCDedit /delete [IDENTIFIER]”, minus quotes, replacing “[identifier]” with the alphanumeric string of the entry you wish to delete. Press “Enter” to complete, and reboot to test the settings. Repeat this command for any other entries you wish to remove.

Example: bcdedit /delete {b5c086a9-359d-11e0-ae5e-82634f96898b}

It must be to do with using imagex to capture and apply and the bcd commands. for the love of…. I got it working perfect and it was either during the imagex apply or the bcdboot setting but I CANT seem to recall what switch made it work! 2 device now and its not working like it just did on this other device… all same model/settings… er!

Yeah…that’s part of the reason I made this post, was all the times I got confused, I had to document it here so I could come back and follow my own instructions.


I’m not able to run the sysrep.exe cmd; I get the “file is being used by another process” whatever message. Any clue on that?

I just ran into this. There’s a box that comes up when your in audit. Can’t remember the name of it but it has a drop down list that gives you options to reboot in audit mode , sysprep mode, OOBE mode and I think something else. Close that by clicking on the X in the upper right corner. Wait about 30 seconds to make sure the process shuts down. You can then run sysprep from the command prompt.

sysprep.exe /generalize /oobe /unattend:Unattended.xml /shutdown

I’m having issues with this command in Win 10 Ent. Every time I try it gives me a pop up saying Usage: syspre.exe..(optional Arguments).. If no command line arguments are provided, a graphical interface is used to select the desired sysprep operation.

No matter what order I put the arguments I get the same unless I leave out unattended:Unattended.xml then it just does basic oobe… Not sure what is wrong.

You’re probably not in the sysprep directory via the command prompt. You can either cd to that directory or just put in the full path the Unattended.xml file.

I was definitely in the sysprep directory. The folder path for the file is –
CMD Prompt – C:\Windows\system32\sysprep…
I even tried the direct path in the CMD from E the flash drive that it moved over on – But you’re right using the full C drive path name seemed to work. No idea why.

-“Now, you can save both partitions to their own image file:
Dism /capture-image /imagefile:j:\w10reserved.wim /index:1 /ApplyDir:r:\
Dism /capture-image /imagefile:j:\w10.wim /index:1 /ApplyDir:c:\”

What does /index:1 and /applydir:r do? I’ve been trying to run this cmd but I keep getting an Error: 87
The /index option is not recognized in this context.

All forums I’ve visited only show the index and applydir arguments being used with the dism/apply-image cmd.

It applies the image to the partition.

The index is basically a version of Windows. Run dism /get-wiminfo /wimfile:install.wim and you will see the index numbers. The .iso usually contains several different versions. But the Mircosoft System Reserved partition doesn’t have a different version. In fact, I recently learned you can make the MSR partition via diskpart, which is how I do it now; especially for EUFI machines.

This is the only cmd that worked for me –

Dism /Capture-Image /ImageFile:j:win10.wim /CaptureDir:C:\ /Name:Drive-C

I got it from Microsoft’s TechNet page and it actually seemed to function just fine. The only problem was my unattended file failed after reboot… I googled the error and found I had to launch cmd line and open regedit and change the childcompletion reg key from 1 to 3 to boot back into windows on the new machine. Something in the unattended file isn’t right. It may be the domain join; which I think I’ll just skip as I can do that after I’ve imaged the machines.
Of course that was just a test on an old tower that used MBR boot and now I need to make it work with Newer SSD laptops that run EUFI boot and make sure my wim is customized properly.

You shouldn’t need to do any registry hacks to get the job done. The Unattended file is very, very picky and one wrong syntax will fail the whole thing, which you don’t know about until you start up the machine. Keep the Unattended file as simple as possible and then use the first boot script to finish customizing.

I am having problems with this step as well.
Your directions state you can use another usb drive; however you never show an instruction line for that step. I don’t want to put the computer on the network until after I am using the new image.

I have tried setting the other usb drive to j; however I end up with the same error as Branden

I apologize for the lack of clarity. You get the error on boot regarding the answer file?


Thanks for this very useful info. Will this work on a UEFI system though? I am trying to push windows 10 image on a T560 thinkpad, its not booting. Only way I can make it work is to boot windows 10 vanilla from a USB let it create the partitions then only format the main partition then apply the image.

Not as-is. The script needs some modification as one of the other commenters pointed out. I’m still working on refining my version into something that’s easy for others to understand as well.

If I am cloning 600 computers this summer with this method, what do I set the computer name to. Should I choose not to join the domain also.

I struggled with the computer name quite a bit as you can’t hardcode it or you’ll end up with a bunch of computers trying to claim the same name. Especially when you’re on a domain, that won’t fly. I settled on using %COMPTUERNAME%, which will let Windows decide the computer name. You can always rename them afterwords.

I’m sure there is also a way to use some other variables, but I never looked too deeply into it.

We also have a disk duplicator 1 to 11. Which we used in previous summers. At what step could I use that also. I assume after running wpeutil. Shutdown instead of reboot. Then use disk duplicator. I have 240 of the same model machines and this could be quicker. Pro: quicker, Con: taking HDD of computers and reinstalling them, may not be. Maybe a wash in time.

If you wanted to use some sort of cloning software, you would want to capture the image after running sysprep and shutting down the computer–same as you would with WinPE.

If you have to take out the hard drives, you may as well learn WinPE and throw it on a few flash drives or CDs and then just boot to that.

It’s also possible to create a PXE server that will boot into WinPE so you can just set your computer’s boot order to boot to the network first and then it will. That was what actually worked best for me, but it took some hacking to get there.

I used a FOG server modified to boot only into WinPE using wimboot…another post for another day.

More about targeting applications by Department than drivers. So the base image is for the initial setup. Then I install all the apps for a specific set of computers, then make an image and clone the rest.

I am on Enterprise Build 1607. I had to modify the directions a bit.

I had to list partitions to get the proper system and windows primary partition and change the number in the capture steps. Also, Letter=C was already assigned. The capture command at this level is different.

Dism /Capture-Image /ImageFile:c:\my-windows-partition.wim /CaptureDir:C:\ /Name:”My Windows partition”
Dism /Capture-Image /ImageFile:s:\my-system-partition.wim /CaptureDir:R:\ /Name:”My system partition”

Also Some of the Answer file stuff said it was no longer valid in this version. I am creating base image, then using that to create more targeted images. My goal is clone 600 computers, I can answer a few question at boot. I left the license key and that’s it. Each image will be based on the model of computer I am imaging and software needs. I think I will have 5 or 6 images.

The article helped a lot. Just needed to experiment a little.

You can do it that way, but maintaining a single thin image is much easier. You can then use a source-controlled first boot script to handle the rest of the machine provisioning.

If it’s drivers you are concerned about for the different models, you can use the dism command line tool to add the drivers directly into the image. It’s much more efficient and easier to administer because you only need to really worry about adding new drivers and then updating the first boot script.

This is awesome. One question, does the entry called ComputerName successfully prompt for a computer name and then apply this name when the computer is joined to the domain? That is what I’m after. I made a mistake in the timezone entry so the execution of my unattend file failed for that reason. I ran validate the unattend file which passed with the value ComputerName in the ComputerName field. But I’m reading everywhere including official Microsoft documentation that the computername prompt is removed from OOBE. No one else says to use ComputerName for the computer name, they just say no it won’t prompt you for a name. I would just like to confirm that this works before I try my third and final sysprep attempt on this golden image. Thanks.

The last build I tried on was Windows 10 v1607.1, and it seemed to work there. I know lots of the keys were deprecated, but the basics mentioned in this article still work for me.

Using * appears to prompt. Using %ComputerName% assigns a random name. When using a * you have to watch out when you try to name it. It is fairly common to click into the name field and somehow accidentally add a space before or after the existing name. When you change the name sometimes you leave the space and get a error. Make sure you clear the field before typing in a new name when prompted.

My apologies. Seems I cant spell my name quite as well as I an pass along the incorrect info. In build 1607 %computtername% or computername will cause a XML file processing error during setup. Using just a asterisk will create a random name that is based on part the Registered User name followed by a random sequence of letters and numbers.

“Windows could not parse or process the unattended answer file for [specialize]. The settings specified in the answer file cannot be applied. The error was detected while processing settings for component [Microsoft-Windows-Shell-setup”

The only thing I changed is the settings for computer name. Asterisk by itself works fine. % or asterisk with computername does not.



UT Southwestern Medical Center
Facilities Management
Central Standard Time

Hmmm. I wonder if you could put in %SERIALNUMBER% to ensure uniqueness while naming the computer something meaningful.

The word Computername above in italics actually was typed in with asterisks (*) on both sides of the word Computername. My entry in the field in my unattend file generated by WSIM has the asterisks before and after the word ComputerName. Just wanted to clarify…

I use %COMPUTERNAME%, which generates a random (or seemingly random) computer name. I know in some software called Altiris, you were able to specify a base computer name and append some numbers to it, but I’m not sure how it is accomplished. Using %COMPUTERNAME% ensures a unique name, which is important when joining a domain. The name can be changed later via a script, which is how I handle it.

These instruction to create and get the image were right on the nose..until the last 2 commands. I could not get the image to work and will end this post with what I used for NET USE….and then DISM commands.
A note needs made that each time you attempt an image..but it fails about….you then log in as a “new local user” but your Unattended.xml file will be gone. So you need to save it off to a USB so you can put it back in the Sysprep folder after each unsuccessful Sysprep attempts. only get 3 attempts before Sysprep errors out for too many uses. There is a manual reset to change registry entries call Generalize and rearming and a few others.

Here are what I used in my last 2 steps that worked on a Windows 10 PE created DVD.

Net Use j: \server\share\ /user:username@domain “password”

dism /Capture-Image /ImageFile:j:\win10reserved.wim /CaptureDir:r:\ /Name:”Windows 10 reserved”

dism /Capture-Image /ImageFile:j:\win10.wim /CaptureDir:c:\ /Name:”Windows 10 full copy”

***You can put whatever text you want to call the image between the quotes.

Are you referring to these commands?

Dism /capture-image /imagefile:j:\w10reserved.wim /index:1 /ApplyDir:r:\
Dism /capture-image /imagefile:j:\w10.wim /index:1 /ApplyDir:c:\

If so, you may need to modify the index, the paths, or filenames to match your environment. Or in your case, you may have not needed the index.

The behavior you are describing when Unattended.xml gets removed is the expected behavior. You don’t need to log in as a local user, you can log in under Audit Mode to verify any settings. You do this by pressing CTRL+SHIFT+F3. It’s a very confusing process.

And you do indeed only get three tries under the method you described. You can change this behavior by setting another key in the unattended file called SkipRearm.

All of these things are Microsoft’s way of doing things. It’s the reason I made this post, because I never understand what the Microsoft engineers are thinking and they can’t seem to make up their mind about how to implement something.

So we have 4 partitions on UEFI devices. I know to assign C drive letter to primary. Do I assign r to Partition 1 (System) or Partition 2 (Reserved)? Logically, I think it is Partition 1 (System)

You actually need a completely different script for UEFI devices. Someone in the comments linked to one.

Great! I personally haven’t made time to write up the UEFI instructions, so I’m glad you got it working.

Thank you so much for all of this wonderful information. Almost made it all the way through. When I capture my Microsoft Reserved Partition after sysprep and booting to WinPE it is empty (2kb). When I deploy the two .wim’s and boot it tells me there is no bootable drive present. If I use Diskpart to check out the first partition, it has nothing in it. Thanks for any direction.

I wanted to take the time to tell you how helpful your instructions were for me deploying Windows 10 to all of my users! Thank you very much for these instructions they were very helpful and my organization is grateful for you knowledge. Have a nice day.

I’m glad it helped. I struggled for a long, long time with it so I wanted it to be useful to others.

Hi Jacob,

Thanks for this guide! I almost made it to the end, but I get a few errors I’m hoping you can help with.

First, when I try to do this:

select partition 1
assign letter=r

I get an error saying “the selected disk is not a fixed MBR disk”

Second, when I run this command:
Dism /capture-image /imagefile:j:\w10.wim /index:1 /ApplyDir:c:\
I get an error saying “The /index option is not recognized in this context”

When I remove the /index option to see if it will work, I get an error saying “The /applydir command is not recognized in this context.

I saw your warning: ” So it is important that you do not start the computer until you are ready to boot it into WinPE to capture the image (in a state before it has been booted).”

I did boot the test pc to the wrong USB drive once…could these errors all be due to that?

Thanks for any advice!

Depending on the version of your Windows install, you may not need the index; it’s just for DVDs with different versions on it.

The MBR error is because this guide is for BIOS-based computers and your’s must be UEFI. One of the comments links to a working guide for these computers.

Hello Jacob,

I have followed all the steps thoroughly. And it is really a nice article.
I am struggling with this from last two days. I have ended up everything well. But when i am typing command “wpeutil reboot” at the end. The screen comes with “An operating system wasn’t found.Try disconnecting any drives that don’t contain an operating system.”
I don’t know what is this about. I just applied the image well.
Can you please help me out here.

Do you have multiple drives? Perhaps your computer is configured to boot to a drive other than the one you are deploying Windows to?

Jacob, i just created a image of 10 GB, perhaps that could be the reason behind this. Well ,I am not sure.
What i am trying to do is preparing 50 systems at the same time. Now the last thing i am stuck with is executing the answer file. It is showing some error in Pass 4 Specialize.
I don’t want to join domain yet. So i just left username and password vacant. It gave the same error. The 2nd thing i tried is not adding the “unattended join” to Pass 4 , But still the error was same.
I am not able to make the perfect answer file.

If you’re not going to join it to the domain, you need to remove that section from the XML completely; leaving it blank will cause the error you are seeing.

Jacob, very nice job, man, much appreciate, too. I wanna to customize some sort of things, like: a)insert a different icon and label on drive C: via HKLM and b)drive D: via HKCU. I do it manually after system is setted up. I’m trying to discover where I set the registry to replicate the item “b)” to new users. For example: to new user John, drive D: must have the label “John’s Files”; to new user Connor, drive D: must have the label “Connor’s Files”, and so on. I wanna this to be automatic. I use ProfileRelocator to change the location of Users folder from C: to D:. With this, I don’t need to move all new user’s dirs one-by-one via properties->location->change location etc. Windows do this entirely alone after change and reboot. When user logs in for first time, all is in “D:\Users\”, including appdata. To confirm, after all, I exclude the dir “C:\Users” and reboot. All OK. I use this since 2014. Sorry for my bad english.

Hi. Thanks for the wonderful guide, it will defenatly help me since it’s going to be the first time i’m going to image a system and apply it to a few other same models. My main question is: can I use this article to prepare a master immage with updates, software etc installed, and have the exact configuration taken to the other systems. I want to minimize repetitive work so it helps to have one image wich i can just apply to the others. Can I for instance add a local account in the master image, as well as some language specific things, and have the whole thing copyed over as if i had done the same for all other systems, or are the instructions different then.

You can. It’s best to add the user account in the unattended answer file and then add additional accounts via the post-install script.

hello, ive been using this guide for a while now, and its been working on point until I tried creating a Windows 10 image ver. 1803. for some reason when I start the machine after imaging, it takes a long, long time to get to the main screen and it doesn’t read most of the answer file. any ideas?

This guide has worked great up until I get to this:
“It’s most useful to save the image to a network share, but you can save it to another USB drive attached to the computer. So first, mount a network share and assign it a drive letter.”

I need to save it to a USB stick and you don’t give instruction to do so. I have tried but cannot figure out how to do it.

If it’s already formatted it probably already has a drive letter, you just need to look at which one it is.

Yes, they actually don’t work for EUFI. There is a separate script in the comments of this post that work to do that.

Hello Jacob, i have some questions when i come in this step “Install Windows 10 On A Spare Computer”
i install windows 10 on wmvare workstation and after that i will need add some softs and updates on pc browswers and etc… it will need to do in Sysprep Audit mode first? or just install all updates and soft and Then Sysprep OOBE Generalize Shutdown?

There’s lots of confusing steps. I generally try to do everything in the answer file and then do any updates after the fact with other tech. The process of making an image is difficult, so making it as generic as possible is a good method. Microsoft makes ADT now, which simplifies the way I used to do, but I still prefer a blank Windows image and then use scripting and other stuff to configure it post-build.

Leave a Reply