Windows 10: Answer file / autounattend.xml DiskID changes after loading drivers

Discus and support Answer file / autounattend.xml DiskID changes after loading drivers in Windows 10 Installation and Upgrade to solve the problem; Hi, I have a problem I hope someone might be able to help me with. I'm adapting my unattended installations to load certain drivers through the... Discussion in 'Windows 10 Installation and Upgrade' started by Juun89, May 4, 2021 at 9:27 AM.

  1. Juun89 Win User

    Answer file / autounattend.xml DiskID changes after loading drivers


    Hi, I have a problem I hope someone might be able to help me with. I'm adapting my unattended installations to load certain drivers through the autounattend.xml, mostly AHCI/Disk drivers. The problem I face is that when one such driver is needed, the DiskID changes from 0 to 1 (the installation media being 0) during installation and the unattended setup fails because DiskID 0 is specified as the disk to partition, format and install on. This is probably due to the system disk not being available before the drivers are loaded and when they do load, it gets added to the already known disks (the installation media) resulting in a DiskID of 1. I would like to find a workaround so I don't need to change the autounattend.xml every time the installation process might need a driver, since on a system that doesn't need the separate driver, the DiskID will always be 0. Possbile solutions I could think of: - For the installation to prompt which disk to use when the specified ID isn't available or valid - Always load the largest drive (all systems have only one disk except for the installation media) - Always ignore the installation media during installation I haven't found a way to solve it though, any help would be great. Since I couldn't find how to automatically load drivers during unattended setup I'll explain two options here that are tested and work. This is for future reference for anyone who is searching for it. How to automatically load drivers during unattended Windows 10 installation using answer file (autounattend.xml). Option one: Add a folder named "$WinpeDriver$" to the root of the installation media and place the drivers inside this folder. This folder will be scanned for drivers during Windows setup automatically. Make sure the drivers are the extracted drivers from the manufacturer which include the files with .inf extensions, you have to manually extract this with for example 7Zip. You can place these drivers in any subfolder under "$WinpeDriver$". Microsoft resource: Using \$WinpeDriver$ $WinpeDrivers$ is an additional folder structure that Setup.exe looks for and if found, is parsed to pull in additional drivers. Setup will recursively parse files and folders under this \$WinpeDriver$ folder looking for *.INF files and attempts to install these discovered drivers into the driverstore. Folder structure can look something like this on the root of the USB device: \$WinpeDriver$ └\WiFi └\Wireless1 └Wireless.INF └Wireless.SYS └Wireless.CAT (Needed by operating system) Note If you look in the \Windows\Panther\Setupact.log you can see reference to this folder: PnPIBS: Checking for pre-configured driver paths ... PnPIBS: Checking for pre-configured driver directory C:$WinPEDriver$. PnPIBS: Checking for pre-configured driver directory D:$WinPEDriver$. PnPIBS: Checking for pre-configured driver directory E:$WinPEDriver$. PnPIBS: Checking for pre-configured driver directory X:$WinPEDriver$. Option two: It's possible to specify a custom folder to load drivers from by adding this to the autounattend.xml answer file. The code to add is as follows. This is added after "<settings pass="windowsPE">". Code: <component name="Microsoft-Windows-PnpCustomizationsWinPE" 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"> <DriverPaths> <PathAndCredentials wcm:keyValue="1" wcm:action="add"> <Path>%configsetroot%\Drivers</Path> <Credentials></Credentials> </PathAndCredentials> </DriverPaths> </component> The thing to note in this is that "%configsetroot%" is how you specifiy the (USB) installation media as the root path in where there is another folder (in my example named "Drivers") where the actualy drivers are located. The folder structure can be the same as in the first option. To be able to use "%configsetroot%" an extra element needs to be called in the autounattend.xml: Code: <UseConfigurationSet>true</UseConfigurationSet> Below is an example from my autounattend.xml to see where it's placed. This example is the part where it creates the disk layout for an UEFI installation: Code: <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"> <DiskConfiguration> <Disk wcm:action="add"> <CreatePartitions> <CreatePartition wcm:action="add"> <Order>1</Order> <Size>500</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>16</Size> <Type>MSR</Type> </CreatePartition> <CreatePartition wcm:action="add"> <Extend>true</Extend> <Order>4</Order> <Type>Primary</Type> </CreatePartition> </CreatePartitions> <ModifyPartitions> <ModifyPartition wcm:action="add"> <Format>NTFS</Format> <Label>WinRE</Label> <Order>1</Order> <PartitionID>1</PartitionID> <TypeID>DE94BBA4-06D1-4D40-A16A-BFD50179D6AC</TypeID> </ModifyPartition> <ModifyPartition wcm:action="add"> <Format>FAT32</Format> <Label>System</Label> <Order>2</Order> <PartitionID>2</PartitionID> </ModifyPartition> <ModifyPartition wcm:action="add"> <Order>3</Order> <PartitionID>3</PartitionID> </ModifyPartition> <ModifyPartition wcm:action="add"> <Format>NTFS</Format> <Label>Windows</Label> <Letter>C</Letter> <Order>4</Order> <PartitionID>4</PartitionID> </ModifyPartition> </ModifyPartitions> <DiskID>0</DiskID> <WillWipeDisk>true</WillWipeDisk> </Disk> </DiskConfiguration> <ImageInstall> <OSImage> <WillShowUI>OnError</WillShowUI> <InstallTo> <DiskID>0</DiskID> <PartitionID>4</PartitionID> </InstallTo> </OSImage> </ImageInstall> <UserData> <ProductKey> <Key>VK7JG-NPHTM-C97JM-9MPGT-3V66T</Key> <WillShowUI>OnError</WillShowUI> </ProductKey> <AcceptEula>true</AcceptEula> </UserData> <UseConfigurationSet>true</UseConfigurationSet> </component> Microsoft references: https://docs.microsoft.com/en-us/win...0answer%20file. https://docs.microsoft.com/en-us/tro...er-dollar-sign https://docs.microsoft.com/en-us/win...nfigurationset

    :)
     

  2. Windows 10 autounattend xml installation problem

    Ok, that's a good start.

    Your answer file is made for a Gen 2 Hyper-V. It won't work on Gen 1.

    Verify the settings I have outlined in the image below:


    Answer file / autounattend.xml DiskID changes after loading drivers [​IMG]


    NOTE: I have not looked at the answer file in detail. If you are still having difficulty, I'll look closer, but for now, time for sleep. It's 0500 here *Smile
     
  3. radoslav Win User
    Windows 10 autounattend xml installation problem

    Hyper V gen2 configurations are like yours but when I start the VM I get that error:
    Answer file / autounattend.xml DiskID changes after loading drivers [​IMG]

    I have done one more thing to the image, I loaded the image with NTLITE and there is an option explore mount directory basically there you can add a folder with files so when the image is installed for example you can have it in C:\CustomFolder with files and after that, with the program, you created the ISO file.
     
  4. mr. Adam Win User

    Answer file / autounattend.xml DiskID changes after loading drivers

    C++ source code to compare XML files like ExamXML XML differ

    I’m working on a Linux project that includes identifying changes between XML files and I need a source code on C++ to compare XML fragments.
    I’m using differencing tool ExamXML from A7Soft provides tools to compare XML documents to compare and merge XML files but this is Windows application.

    Thanks.
     
Thema:

Answer file / autounattend.xml DiskID changes after loading drivers

Loading...
  1. Answer file / autounattend.xml DiskID changes after loading drivers - Similar Threads - Answer file autounattend

  2. XML Files

    in Windows 10 Software and Apps
    XML Files: Hi folks! Just registered to this forum and glad to have found it. So I was installing Ubuntu on my computer which already had windows 10.I wanted to have a dual OS. Things went south and windows got deleted/ over written or whatever. I used a hard drive recovery device to...
  3. Creating autounattend

    in Windows 10 Ask Insider
    Creating autounattend: Hi all, i have this issue while trying to install win 10 on my elitepad tablet. It boots up but i am unable to touch anything. Because usb hub cost stupid +200$ i though of creating unattend.xml file. But to my surprise it dont work. Does anyone of you have tips or...
  4. Windows 10 autounattend xml installation problem

    in Windows 10 Virtualization
    Windows 10 autounattend xml installation problem: Hi guys, I have a problem with autounattend XML install. Basically, I have a Windows image that is downloaded from MS and edited to skip all steps for setup. The windows boots and wipe the hard drive created partitions, select language, and created one admin account with the...
  5. Windows 10 autounattend xml installation problem

    in Windows 10 Support
    Windows 10 autounattend xml installation problem: Hi guys, I have a problem with autounattend XML install. Basically, I have a Windows image that is downloaded from MS and edited to skip all steps for setup. The windows boots and wipe the hard drive created partitions, select language, and created one admin account with the...
  6. Files changed to .XML after copying to Ext. Hard Drive - Cannot Open!!

    in Windows 10 Network and Sharing
    Files changed to .XML after copying to Ext. Hard Drive - Cannot Open!!: I copied my jpg photos to my external hard drive and trying to open in my Windows 10 system but unable to open. Can see all the files in my external hard drive converted to type XML with original file sizes. Tried copying to desktop, checked in another laptop and renamed...
  7. Edit File History config1.xml and config2.xml Files Directly

    in Windows 10 Ask Insider
    Edit File History config1.xml and config2.xml Files Directly: I'd like to make some changes to the File History config1.xml and config2.xml files to "clean" things up a little ... like sort included folders alphabetically, etc. However, if I edit these four files directory (there are two of each) they revert back to their default values...
  8. Win 10 Images from Answer file XML with delay in settings

    in Windows 10 Customization
    Win 10 Images from Answer file XML with delay in settings: I've seen some issues mentioning Windows 10 sysprep'ed and long delays with system settings after deployment. I've seen this with both Win10 Ent and Win10 IOT Ent. So there is a commonality with Win 10 in general deploying with an answer file. Has anyone seen this and got...
  9. .net Missing .xml Files

    in Windows 10 Updates and Activation
    .net Missing .xml Files: After Windows installed the recent major build, now when I try to open a module in Access Windows installer opens and tries to reinstall access. I wound it is caused by missing xml files in the Microsoft.net folder that MzTools uses in Access. MzTools is an Access Add-in....
  10. Need assistance with answer file, and some changes reverted after

    in Windows 10 Support
    Need assistance with answer file, and some changes reverted after: This tutorial will show step by step how to completely automate Windows Setup and OOBE: Create media for automated unattended install of Windows 10 - Windows 10 Tutorials For Edge favorites, you can use Group Policy Editor (gpedit.msc) to set them in Audit Mode before...