Windows 10: Image Windows 10 laptops with DISM (or other free tool)

Discus and support Image Windows 10 laptops with DISM (or other free tool) in Windows 10 Backup and Restore to solve the problem; I've got an update *Smile I did some experimenting this morning and the only way I have been able to automate the language screens, disk... Discussion in 'Windows 10 Backup and Restore' started by xy677, Feb 28, 2017.

  1. xy677 Win User

    Image Windows 10 laptops with DISM (or other free tool)


    I've got an update *Smile

    I did some experimenting this morning and the only way I have been able to automate the language screens, disk configuration etc when installing Windows 10 is to add the AutoUnattend.xml to the root of the ISO/bootable USB drive. If I do this then Windows will install itself automatically and all I have to do is press any key to boot off the ISO/USB and a few minutes later I will be presented with a Windows desktop. The AutoUnattend.xml looks as follows so far:

    Code: <?xml version="1.0" encoding="utf-8"?> <unattend xmlns="urn:schemas-microsoft-com:unattend"> <settings pass="windowsPE"> <component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <SetupUILanguage> <UILanguage>en-GB</UILanguage> </SetupUILanguage> <InputLocale>0809:00000809</InputLocale> <SystemLocale>en-GB</SystemLocale> <UILanguage>en-GB</UILanguage> <UserLocale>en-GB</UserLocale> <UILanguageFallback>en-GB</UILanguageFallback> </component> <component name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <UserData> <AcceptEula>true</AcceptEula> </UserData> <ImageInstall> <OSImage> <InstallFrom> <MetaData wcm:action="add"> <Key>/image/index</Key> <Value>1</Value> </MetaData> </InstallFrom> <InstallTo> <DiskID>0</DiskID> <PartitionID>4</PartitionID> </InstallTo> </OSImage> </ImageInstall> <DiskConfiguration> <Disk wcm:action="add"> <CreatePartitions> <CreatePartition wcm:action="add"> <Order>1</Order> <Size>1024</Size> <Type>Primary</Type> </CreatePartition> <CreatePartition wcm:action="add"> <Order>2</Order> <Size>100</Size> <Type>EFI</Type> </CreatePartition> <CreatePartition wcm:action="add"> <Order>3</Order> <Size>128</Size> <Type>MSR</Type> </CreatePartition> <CreatePartition wcm:action="add"> <Order>4</Order> <Extend>true</Extend> <Type>Primary</Type> </CreatePartition> </CreatePartitions> <DiskID>0</DiskID> <WillWipeDisk>true</WillWipeDisk> <ModifyPartitions> <ModifyPartition wcm:action="add"> <Order>1</Order> <PartitionID>1</PartitionID> <Format>NTFS</Format> <Label>WinRE</Label> <TypeID>DE94BBA4-06D1-4D40-A16A-BFD50179D6AC</TypeID> </ModifyPartition> <ModifyPartition wcm:action="add"> <Order>2</Order> <PartitionID>2</PartitionID> <Label>System</Label> <Format>FAT32</Format> </ModifyPartition> <ModifyPartition wcm:action="add"> <Order>3</Order> <PartitionID>3</PartitionID> </ModifyPartition> <ModifyPartition wcm:action="add"> <Order>4</Order> <PartitionID>4</PartitionID> <Letter>C</Letter> <Label>Windows</Label> <Format>NTFS</Format> </ModifyPartition> </ModifyPartitions> </Disk> </DiskConfiguration> </component> </settings> <settings pass="oobeSystem"> <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <OOBE> <HideEULAPage>true</HideEULAPage> <ProtectYourPC>1</ProtectYourPC> </OOBE> </component> </settings> </unattend>[/quote] NB: This is for a UEFI install

    So what I did was try this out on an original Windows 10 ISO. I basically just updated the original ISO to have the
    AutoUnattend.xml in the root. This worked 100% using the original install.wim.

    After getting the AutoUnattend.xml to work, I then updated the original Windows 10 ISO with AutoUnattend.xml and my customised install.wim. This failed miserably. It basically automated the install of Windows 10 (well mostly) but I was then presented with a default Windows 10 desktop (ie: ALL my customisation was gone! Even the programs I installed like Office 2016 wasn't there).

    So I'm confused, why is it when I use AutoUnattend.xml with my customised install.wim file it (mostly) automated the install but then does a default install of Windows and ignores my customisations in the install.wim file?

    Really confused! Is it because I have AutoUnattend.xml in the root of the ISO/USB and have unattend.xml in c:\windows\system32\sysprep in my customised install.wim?

    I'm guessing that my approach to this may be wrong but basically I am trying to do an unattended install of Windows 10 from ISO/USB and to have a customised version of Windows installed with all my changes/applications etc.
     
    xy677, Mar 4, 2017
    #46
  2. Kari Win User

    @xy677

    OK, mystery solved. Got it right this time.

    My issue was false approach; I am so used to boot from PE and use DISM to apply a sysprepped / generalized image from a network share (which works perfectly) that I didn't even think the key differences in applying an image with DISM compared to installing from ISO (Flash drive / DVD).

    Will do two more test installs, both on Hyper-V vm and physical machine, posting about how I did it in an hour or two.
     
  3. xy677 Win User
    Well I think it's finally working for me!! I don't know how or why but somehow having I must have mixed up installing my custom ISO with the original ISO.

    Long story short, I have created a custom ISO with my customised install.wim AND put the Autounattend.xml in the root of the ISO and am now able to do a fully unattended install (with the exception of entering my username which I want) and have a fully customised desktop with Office 2016 installed and fully patched.

    I tried using my custom ISO by booting off it in VMware Workstation and I also created a bootabled USB using the original ISO and then overwriting the origianal install.wim with my own and copying the Autounattend.xml to the root of the USB and both methods worked great! Since my install.wim is about 8GB in size I had to use Rufus to create a bootable USB key using NTFS so that I could use large files in the file system but it worked (FAT32 is a no no for files larger than 4GB in size).

    The one annoying thing I found when customising a Windows 10 desktop is that you can't use Settings to customise certain settings when Windows isn't activated? Is there a way around this? For now I have been editing the registry but it's a pain. Can you activate Windows before you sysprep so you can customise all the settings you want using Settings?

    I also used DISM to compress my wim file and used DISM to do a cleanup of all the Windows Updated which saved a couple gigabytes in space.

    Look forward to your findings and thanks so much for all your help!
     
    xy677, Mar 4, 2017
    #48
  4. Kari Win User

    Image Windows 10 laptops with DISM (or other free tool)

    Method I use to customize desktop in Audit Mode when Settings > Personalise is not working due Windows being not activated is I create a theme file on another machine (theme, background, colours, sounds, screensaver), copy that file to VM in Audit Mode and apply it.

    Could you please post the final answer file you used?
     
  5. xy677 Win User
    That's a good idea, I'll have to look into that.

    unattend.xml:
    Code: <?xml version="1.0" encoding="utf-8"?> <unattend xmlns="urn:schemas-microsoft-com:unattend"> <settings pass="specialize"> <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <CopyProfile>true</CopyProfile> <TimeZone>GMT Standard Time</TimeZone> <ComputerName>RENAME</ComputerName> </component> </settings> <settings pass="oobeSystem"> <component name="Microsoft-Windows-International-Core" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <InputLocale>0809:00000809</InputLocale> <SystemLocale>en-GB</SystemLocale> <UILanguage>en-GB</UILanguage> <UserLocale>en-GB</UserLocale> <UILanguageFallback>en-GB</UILanguageFallback> </component> <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <OOBE> <HideEULAPage>true</HideEULAPage> <HideOEMRegistrationScreen>true</HideOEMRegistrationScreen> <HideOnlineAccountScreens>true</HideOnlineAccountScreens> <HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE> <ProtectYourPC>1</ProtectYourPC> <UnattendEnableRetailDemo>false</UnattendEnableRetailDemo> </OOBE> <TimeZone>GMT Standard Time</TimeZone> </component> </settings> </unattend>[/quote] AutoUnattend.xml: (NB: this does UEFI partitioning!)
    Code: <?xml version="1.0" encoding="utf-8"?> <unattend xmlns="urn:schemas-microsoft-com:unattend"> <settings pass="windowsPE"> <component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <SetupUILanguage> <UILanguage>en-GB</UILanguage> </SetupUILanguage> <InputLocale>0809:00000809</InputLocale> <SystemLocale>en-GB</SystemLocale> <UILanguage>en-GB</UILanguage> <UserLocale>en-GB</UserLocale> <UILanguageFallback>en-GB</UILanguageFallback> </component> <component name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <UserData> <AcceptEula>true</AcceptEula> </UserData> <ImageInstall> <OSImage> <InstallFrom> <MetaData wcm:action="add"> <Key>/image/index</Key> <Value>1</Value> </MetaData> </InstallFrom> <InstallTo> <DiskID>0</DiskID> <PartitionID>4</PartitionID> </InstallTo> </OSImage> </ImageInstall> <DiskConfiguration> <Disk wcm:action="add"> <CreatePartitions> <CreatePartition wcm:action="add"> <Order>1</Order> <Size>1024</Size> <Type>Primary</Type> </CreatePartition> <CreatePartition wcm:action="add"> <Order>2</Order> <Size>100</Size> <Type>EFI</Type> </CreatePartition> <CreatePartition wcm:action="add"> <Order>3</Order> <Size>128</Size> <Type>MSR</Type> </CreatePartition> <CreatePartition wcm:action="add"> <Order>4</Order> <Extend>true</Extend> <Type>Primary</Type> </CreatePartition> </CreatePartitions> <DiskID>0</DiskID> <WillWipeDisk>true</WillWipeDisk> <ModifyPartitions> <ModifyPartition wcm:action="add"> <Order>1</Order> <PartitionID>1</PartitionID> <Format>NTFS</Format> <Label>WinRE</Label> <TypeID>DE94BBA4-06D1-4D40-A16A-BFD50179D6AC</TypeID> </ModifyPartition> <ModifyPartition wcm:action="add"> <Order>2</Order> <PartitionID>2</PartitionID> <Label>System</Label> <Format>FAT32</Format> </ModifyPartition> <ModifyPartition wcm:action="add"> <Order>3</Order> <PartitionID>3</PartitionID> </ModifyPartition> <ModifyPartition wcm:action="add"> <Order>4</Order> <PartitionID>4</PartitionID> <Letter>C</Letter> <Label>Windows</Label> <Format>NTFS</Format> </ModifyPartition> </ModifyPartitions> </Disk> </DiskConfiguration> </component> </settings> <settings pass="oobeSystem"> <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <OOBE> <HideEULAPage>true</HideEULAPage> <ProtectYourPC>1</ProtectYourPC> </OOBE> </component> </settings> </unattend>[/quote] Just for fun I timed installing Windows using my customised ISO and it took just under 8min which is pretty impressive considering it has Windows 10 install FULLY patched, Office/Visio 2016 FULLY patched and has all my customisation! Just installing Windows Updates took me about an hour to do on it's own *Biggrin
     
    xy677, Mar 4, 2017
    #50
  6. Kari Win User
    OK, no bigger difference in our autounattend file except I've been testing today in Hyper-V Generation 1 VM which means it's BIOS / MBR whereas your file is for UEFi / GPT.
     
  7. Kari Win User
    BTW, the MSR partition only needs to be 16 MB. I also noticed you have set one gig for RE partition, half of that is enough. Of course there's no harm done with bigger partitions.
     
  8. xy677 Win User

    Image Windows 10 laptops with DISM (or other free tool)

    Thanks for the tip! Over the coming week I am going to be refining this image so it's **exactly** the way I want it.I've got some snapshots saved in VMware for my technician VM so its relatively simple (although still kinda painful) to update the image/answer files.

    It's taken a lot of effort to get to this stage but wow, the end result is amazing. 8min to do a FULL install that is patched and customised...just...wow.

    I have to say, BIG thank you for all your help, time and effort! You've been amazing and so helpful. I have your videos bookmarked and they are excellent. I've watched them a few times which helped me immensely!
     
    xy677, Mar 4, 2017
    #53
  9. Kari Win User
    It's a two way street. In fact, this thread is for me what Ten Forums is at its best: in trying to get this resolved with you has taught a lot to me. I have been too keen to keep my old habits, boot to PE, make partitions with DISKPART script and applying images from a share. It is interesting to work together for a common goal, I am learning more and more the further we go.

    Seriously, thank you for an interesting thread *Smile
     
  10. Kari Win User
    Everything works in my tests, too, both on MBR and GPT disks. The key was and is two different answer files, sysprep with normal unattend.xml and then add autounattend.xml to root of ISO to take care of unattended partitioning and installation.

    It's kind of funny that I didn't even think of it although we went close already in page #2, talking about the difference between these two answer files, that for WindowsPE pass you need to use autounattend.xml:

    This from https://technet.microsoft.com/en-us/...(v=ws.10).aspx (article written for WIndows 7 deployment but applies to Windows 10, too):

     
  11. xy677 Win User
    Wer got there in the end except we took the scenic route *Wink

    Glad it worked out for you as well in your testing. I'm super chuffed with the results and plan on rebuilding my PC now!
     
    xy677, Mar 4, 2017
    #56
  12. xy677 Win User
    I forgot to ask, is there a simple(r) way to update my ISO/wim file when new Window/Office updates are released?

    Do I have to download every update manually and then add/inject the update into the install.wim image?
     
    xy677, Mar 5, 2017
    #57
  13. Kari Win User

    Image Windows 10 laptops with DISM (or other free tool)

    I have to say I don't know about that.

    As I mentioned I don't use ISO method to deploy, even on my home network I apply images with DISM. This makes updating image relatively easy and fast; I create a standard Hyper-V checkpoint on my technician VM just before sysprepping and occasionally just apply the checkpoint, run Windows Update and update installed software like browsers and Office, then remove all installers and run Disk Clean-up to remove temp files, sysprep again and capture new install.wim to replace my old one.

    Although Windows Update works in Audit Mode, build and feature upgrades do not work. When I want to upgrade my image I sysprep it once with /generalize, /oobe and /reboot switches, create a dummy local admin account in OOBE, sign in to desktop to upgrade for instance with latest Insider build, when done run sysprep with /audit and /reboot switches to boot back to Audit Mode, remove the dummy user and its profile folder, remove all installers and run Disk Clean-up to remove temp files, sysprep again and capture new install.wim to replace my old one.
     
  14. xy677 Win User
    Thanks Kari! There are some new Windows/Office Updates coming out next week so I am going to see how this goes. I'm also interested in when another upgrade (or new build) comes out for LTSB to upgrade my image.

    Keeping a snapshot just before you run sysprep is VERY useful!
     
    xy677, Mar 5, 2017
    #59
  15. xy677 Win User
    So I discovered something interesting during my sysprep/test image. I setup my VM exactly how I wanted it, ran sysprep and created a new customised ISO.

    One of the settings I changed was to disable (or turn off) the Location Service at:

    Settings - Privacy - Location - Location Service

    So before running sysprep the Location Service was off but after I used my customised ISO (with updated install.wim) to install Windows, the Location Services was on! I even went back to my snapshot just before running sysprep and sure enough it was off so why did it turn itself on again after installing Windows from my customised ISO? There were a few other privacy settings that did this but I thought I'd focus on the Location Services first.

    Also, after installing Windows with my customised ISO and the desktop appears, I get prompted as follows:


    Image Windows 10 laptops with DISM (or other free tool) [​IMG]


    In my image (before I run sysprep) I set the following local group policies thinking this would get rid of this screen:

    Computer - Windows Settings - Security Settings - Network List Manager Polcies - unidentified networks - location type - public
    Computer - Windows Settings - Security Settings - Network List Manager Polcies - identifying networks - location type - public

    But it doesn't seem to be working. Is there somewhere else I need to set this so I don't get prompted with this?
     
    xy677, Mar 7, 2017
    #60
Thema:

Image Windows 10 laptops with DISM (or other free tool)

Loading...
  1. Image Windows 10 laptops with DISM (or other free tool) - Similar Threads - Image laptops DISM

  2. Dism / Imaging question

    in Windows 10 Software and Apps
    Dism / Imaging question: Hello,Personally been a fun year so far, heart surgery, but on the job side I'm FINALLY somewhere where I'm loved and I love the people I'm with, plus I'm learning a crapton of stuff!Ok, a lot of that has delved into dism / imaging and powershell scripting. It really has been...
  3. Dism / Imaging question

    in Windows 10 BSOD Crashes and Debugging
    Dism / Imaging question: Hello,Personally been a fun year so far, heart surgery, but on the job side I'm FINALLY somewhere where I'm loved and I love the people I'm with, plus I'm learning a crapton of stuff!Ok, a lot of that has delved into dism / imaging and powershell scripting. It really has been...
  4. Dism / Imaging question

    in Windows 10 Gaming
    Dism / Imaging question: Hello,Personally been a fun year so far, heart surgery, but on the job side I'm FINALLY somewhere where I'm loved and I love the people I'm with, plus I'm learning a crapton of stuff!Ok, a lot of that has delved into dism / imaging and powershell scripting. It really has been...
  5. Mount image with dism

    in Windows 10 Network and Sharing
    Mount image with dism: Keep getting this errorC:\WINDOWS\system32>dism /mount-image "/imagefile:C:\iso_files\sources\install.wim /index:6 /MountDir:C:\test\offline Deployment Image Servicing and Management tool Version: 10.0.19041.844 Error: 87 The command-line is missing the /mountdir option. For...
  6. Mount image with dism

    in Windows 10 Gaming
    Mount image with dism: Keep getting this errorC:\WINDOWS\system32>dism /mount-image "/imagefile:C:\iso_files\sources\install.wim /index:6 /MountDir:C:\test\offline Deployment Image Servicing and Management tool Version: 10.0.19041.844 Error: 87 The command-line is missing the /mountdir option. For...
  7. Mount image with dism

    in Windows 10 Software and Apps
    Mount image with dism: Keep getting this errorC:\WINDOWS\system32>dism /mount-image "/imagefile:C:\iso_files\sources\install.wim /index:6 /MountDir:C:\test\offline Deployment Image Servicing and Management tool Version: 10.0.19041.844 Error: 87 The command-line is missing the /mountdir option. For...
  8. Windows 10 DISM Tool Version 10.0.19041.329 is different than the Image Version 10.0.19041.546.

    in Windows 10 Installation and Upgrade
    Windows 10 DISM Tool Version 10.0.19041.329 is different than the Image Version 10.0.19041.546.: I ran "DISM /Online /Cleanup-Image /RestoreHealth" and the Windows 10 DISM Tool Version 10.0.19041.329 is different than the Image Version 10.0.19041.546. How do I fix or update DISM Tool Version? Here are my computer specs in case that matters: OS Name Microsoft Windows...
  9. Free Imaging Apps - Windows 10

    in Windows 10 Drivers and Hardware
    Free Imaging Apps - Windows 10: I currently have Macrium (Free) - I say 'have' rather than 'use' because it's too complicated & Macrium have refused to let me have a User Guide. To make matters worse, every hour they send me a notification that an update is available; when I click on their link, no update...
  10. Use DISM to Repair Windows 10 Image

    in Windows 10 Tutorials
    Use DISM to Repair Windows 10 Image: How to: Use DISM to Repair Windows 10 Image How to Repair Windows 10 Image using DISM If a Windows image becomes unserviceable, you can use the Deployment Imaging and Servicing Management (DISM) tool to update the files and correct the problem. For example, you would...