AutoUnattend.xml Partitioning Failure  

Page 6 of 7 FirstFirst ... 4567 LastLast

  1. Posts : 5
    w8
       #51

    haha don't worry!

    if I will be happy to receive your help. thank you anyway.

    if the topic is a bit curious.

    I'm going to do tests. When you have it clearer I will update the post with the answer in case someone else has the same problem.

    Have a good day!



    hsehestedt said:
    Thanks for the update. I have to admit that I've never worked with Windows embedded before, so I'm not certain what differences there are for unattended setup with Windows embedded.

    Let me do some research and see if I can find any answers.

    NOTE: Due to the holiday today here in the US, it's likely to be tomorrow before I respond back again.
      My Computer


  2. Posts : 4,094
    Windows 11 Pro, 22H2
       #52

    Before we even start, I think that this important issue needs to be resolved:

    You mentioned difficulties with the Windows Embedded product key. It is important to note that you should NOT use a product activation key in the answer file. In the answer file, you need to supply a "generic installation key". However, I have not been able to find a generic installation key for Windows embedded anywhere. Is it possible that Windows Embedded is not designed for unattended setup?

    I don't know the answer to that, but that is something you may need to ask Microsoft about.

    Aside from that, I did some testing with your answer file.

    Since I don't have Windows Embedded, I changed the key to a Windows Pro generic installation key and then used your answer file to install Windows. I did make a few changes as I will note below, but it installed Windows just fine.

    Here are the changes that I made:

    1) Because I use US English language versions of Windows, I changed all the language setting to en-US.
    2) I changed the timezone to my local timezone
    3) I removed the entry for "NetworkLocaltion". This setting is deprecated and should no longer be used.
    4) I supplied a password (see my notes about passwords below).

    Here are the steps that I would suggest taking, AFTER you resolve the product ID issue:

    1) Since you are working with a customized sysprep image, it might be worth posting the other answer file here as well (the unattend.xml). The autounattend.xml is only part if you are working with a sysprep image.

    2) I noticed that your answer file has no password specified. Is this just because you removed it before posting your answer file? If not, please be aware of this (this is important!). In the Windows System Image Manager, you should enter a password EVEN IF YOU WANT TO USE A BLANK PASSWORD. If you want to make the passwork blank, don't just leave the password field blank. Instead, enter a password and then press ENTER. Then remove the password (make it blank) and hit ENTER. Now it will properly register a blank password.

    3) Take a look at the image below. You are specifying 3 different languages including 2 different versions of English. You also have the fallback language as 2 different languages in 2 different spots. This should be corrected.

    AutoUnattend.xml Partitioning Failure-image1.jpg

    4) The setting called "NetworkLocation" has been deprecated. You should no longer use it. Delete that entry.

    AutoUnattend.xml Partitioning Failure-image2.jpg

    I hope that this helps!
      My Computers


  3. Posts : 5
    w8
       #53

    hello! thank you very much for the quick reply.


    I will answer your questions!

    On the subject of KEY, yes, I am experiencing problems since I have the original and it does not validate me. I HAVE opened the case with microsoft. (still waiting for the answer)

    In theory W8 Embadden has the Sysprep tool and it hasn't given any problems. Although the installation itself is a bit strange. ( very slow)

    I attach the link, you can take advantage of my key

    https://www.microsoft.com/en-us/down....aspx?id=37019

    Tomorrow I will try your configuration.

    Bios I have it in LEGACY, so I can create 2 partitions or do I have to create 4?

    Thank you


    hsehestedt said:
    Before we even start, I think that this important issue needs to be resolved:

    You mentioned difficulties with the Windows Embedded product key. It is important to note that you should NOT use a product activation key in the answer file. In the answer file, you need to supply a "generic installation key". However, I have not been able to find a generic installation key for Windows embedded anywhere. Is it possible that Windows Embedded is not designed for unattended setup?

    I don't know the answer to that, but that is something you may need to ask Microsoft about.

    Aside from that, I did some testing with your answer file.

    Since I don't have Windows Embedded, I changed the key to a Windows Pro generic installation key and then used your answer file to install Windows. I did make a few changes as I will note below, but it installed Windows just fine.

    Here are the changes that I made:

    1) Because I use US English language versions of Windows, I changed all the language setting to en-US.
    2) I changed the timezone to my local timezone
    3) I removed the entry for "NetworkLocaltion". This setting is deprecated and should no longer be used.
    4) I supplied a password (see my notes about passwords below).

    Here are the steps that I would suggest taking, AFTER you resolve the product ID issue:

    1) Since you are working with a customized sysprep image, it might be worth posting the other answer file here as well (the unattend.xml). The autounattend.xml is only part if you are working with a sysprep image.

    2) I noticed that your answer file has no password specified. Is this just because you removed it before posting your answer file? If not, please be aware of this (this is important!). In the Windows System Image Manager, you should enter a password EVEN IF YOU WANT TO USE A BLANK PASSWORD. If you want to make the passwork blank, don't just leave the password field blank. Instead, enter a password and then press ENTER. Then remove the password (make it blank) and hit ENTER. Now it will properly register a blank password.

    3) Take a look at the image below. You are specifying 3 different languages including 2 different versions of English. You also have the fallback language as 2 different languages in 2 different spots. This should be corrected.

    AutoUnattend.xml Partitioning Failure-image1.jpg

    4) The setting called "NetworkLocation" has been deprecated. You should no longer use it. Delete that entry.

    AutoUnattend.xml Partitioning Failure-image2.jpg

    I hope that this helps!
      My Computer


  4. Posts : 4,094
    Windows 11 Pro, 22H2
       #54

    blyshchak said:
    Bios I have it in LEGACY, so I can create 2 partitions or do I have to create 4?
    If you have a legacy BIOS, then you create the 2 partitions. If your BIOS is UEFI then you create 4. In my post a few days ago I described how you can determine what type of BIOS you have.

    Don't just guess at this. You need to select correctly!
      My Computers


  5. Posts : 2
    Windows 11
       #55

    Hello hsehestedt, im curious what your method is to automatically configure partitions. I figured a way out myself that I’d like to discuss below and see if you think it’s adequate:

    1. Create autounattend.xml. Specify language, license key, windows version. Run command that executes batch script in winPE. Run CreatePartitions-UEFI.txt.

    The createpartitions-uefi.txt script was found here
    : https://learn.microsoft.com/en-us/wi...itions-uefitxt

    The script does shrink the primary partition by 500 MB by default. I changed Reserved partition to 128 MB and EFI partition to 400 MB for windows 11 as I’d read on reddit about how a 100 MB EFI was too small and caused issues for windows 10 to 11 upgrades.

    Thanks hsehestedt. Im curious what your method was if you don’t mind explaining?
      My Computer


  6. Posts : 4,094
    Windows 11 Pro, 22H2
       #56

    @IamTurtle,

    First, welcome to TenForums!

    I have received your question and wanted to respond as quickly as I could, but I need just a little time to put together a good response. Bear with me a little while as I put this together now. I'll respond back again shortly.
      My Computers


  7. Posts : 4,094
    Windows 11 Pro, 22H2
       #57

    For those not familar with the topic that @IamTurtle and I are discussing, here is a summary:

    When performing an unattended installation of Windows, Windows setup will NOT create the recovery partition last. However, Microsoft suggests creating the recovery partition last because doing so allows the recovery partition to be resized without creating an additional new Recovery partition should the need arise with future Windows updates. To keep this posting just a little bit shorter, I won't explain the technical reason behind this, but if this is of interest to you simply let me know and I will gladly explain it.

    There are several ways to work around this issue. Let's start with a brief summary of each of these:

    Remove the Section That Sets Up the Disk in the Answer File

    By far the easiest way around this issue is to simply leave off the section in the answer file that partitions the disk. By doing this, Windows setup will pause installation at the point where a disk needs to be selected for installation. The user will then select the appropriate disk. Windows will then correctly partition the disk with the Recovery partition being created last. After this, setup can continue fully unattended. Here are the advantages and disadvantages of this method:

    This is the easiest method to ensure that the Recovery partition is created last.

    By using this method, nowhere in the answer file do you need to specify what disk number Windows is to be installed onto because you will manually select that disk. This means that this same answer file can be used for installation of different systems even if Windows is to be installed on different disk numbers.

    The interruption in setup asking the user for the disk to which Windows will be installed happens right near the start of setup. This means that the user can select the disk for installation and can then walk away while the remainder of setup continues uninterrupted.

    The disadvantage to this method is that it will use all default sizes for the EFI partition and recovery partition. Of course, at the point where you are asked to select the disk for installation, you could open a command prompt and run diskpart. This will allow you to size all the partitions exactly as you want, but this requires a little bit of effort which is not really in the spirit of performing an unattended setup.

    Create a Script and Inject it Into the Windows PE Setup Image

    This method involves creating a script with commands to be run by diskpart. This script is then injected into the Windows PE image used by Windows Setup and is called from the unattended answer file. Since a script is run to partition the drive, the section in the answer file that is normally used to partition the drive is removed.

    The advantage to this method is that it still allows you to have a 100% automated, unattended Windows setup. The disadvantage to this method is that it does require modification of the Windows PE image in your installation media which some people may not like as a solution.

    Modify the Answer File to Create a Diskpart Script on the Fly

    Finally, you can add a number of lines into your answer file that creates a script for diskpart and executes it on the fly. This is my personal favorite.

    Advantages of this method: This method is 100% fully automated so no input from the user is needed. This method also has the advantage of not requiring the Windows installation media to be modified, the only modifications needed are to the answer file itself.

    Disadvantages: As @Garlin has pointed out in another post, this method requires quite a few lines to be added to the answer file which means that a user could easily introduce an error such as a simple typo. Personally, I disagree with this because I find that I can simply cut and paste these lines in from a known good copy that I keep, however, that would be a decision that you would need to make.

    What's Next?

    Next, I want to provide the detailed instructions to you, however, I don't want to waste cycles writing instructions and posting sample answer files for methods that don't interest you at all. If you have a strong preference for one of the methods noted above, please let me know and I will get you everything you need to implement that method.

    Please let me know what method(s) interest you. If you do not have a preference, need more information to make up your mind, or you genuinely want to know how to implement all of these solutions, please let me know. I'm happy to provide the details for all three, I simply don't want to overload you with info for procedures that are of no interest to you .

    NOTE: After I get your response, it may seem like I'm slow in responding back. I'm dealing with a bit of a sore throat today so I may zonk out for a while, but rest assured that I'm committed to getting to you all the info that you need .

    Summary

    At this point I am waiting for you to tell me which of the above options you are interested in. It's okay if you want info on all of them!

    I will then get you full details, but I may be delayed a bit due to being under the weather.
      My Computers


  8. Posts : 4,094
    Windows 11 Pro, 22H2
       #58

    @IamTurtle, I have not seen a response from you as yet, however, in the meantime I've reviewed my notes on this topic, and they were easy enough to convert into something that I could post here so I'm including instructions for all three options.

    If you have any questions or anything is the least little bit unclear, please do not hesitate to ask questions!


    NOTE: The entire procedure below assumes that we are installing Windows onto a system that has UEFI BIOS rather than a legacy BIOS. If requested, I can post procedures for use with legacy BIOS based systems, however, to my thinking, this should be rare. I just wanted to make 100% clear that this procedure applies only to UEFI based systems.

    The latest guidance from Microsoft suggests that the recovery tools partition be created last. When the disk is configured using unattended installation, the recovery tools partition is NOT created last. This can potentially result in multiple recovery tools partitions being created over time when new feature updates are installed. Normally, this is not something to be concerned about because these are small partitions. Still, there are many who will find this behavior annoying. Fortunately, there are workarounds to allow us to create the recovery tools partition last, even when installing Windows unattended.

    There are three methods that we can use to, with my personal preference being the last (third) option.

    Common steps to all three of the below options

    If you decide to implement any one of the three options below, then please perform these steps first before following the steps for any of those options:

    1) Open your answer file with the Windows SIM (System Image Manager).

    2) Delete the entire Setup > DiskConfiguration block.

    NOTE: Delete only the DiskConfiguration block, NOT Setup.

    3) Expand Setup > ImageInstall > OSImage in the Answer File pane of Windows SIM and select InstallFrom.

    Set path to \install.wim

    4) If the block called InstallTo is present under ImageInstall, then delete the InstallTo block.

    5) Validate your answer file and save it.

    6) Continue with the steps for Option 1, 2, or 3 below.

    7) When running commands in the procedures below, please do so from an elevated Deployment and Imaging Tools Environment command prompt. This ensures that the ADK version of DISM is run and also places the OSCDIMG utility in the path. To do so, go to Start > All apps > Windows Kits > Deployment and Imaging Tools Environment. Right-click on this and select Run as Administrator.


    Option 1 - Omit the entire DiskConfiguration block from your answer file

    There are a few reasons why you might want to omit the disk configuration settings in your autounattend.xml answer file. First, by doing so, you can use the same answer file on systems with different disk configurations. It also allows the same answer file to be used on both BIOS and UEFI based systems. Note that skipping this section without implementing the steps in options 2 or 3 below will cause setup to pause right near the start of installation and to ask you where Windows should be installed. After this, the rest of setup will proceed unattended. The advantage of performing setup in this manner is that you will end up with the recovery tools partition being created last. One downside of this method is that setup will be interrupted requiring that you select a disk to install Windows to just as it would prompt you for if installing Windows without unattended setup. Since this is at the start of setup, this should not be much of an inconvenience if you decide to implement it. This method will create partitions with their default sizes. You can create custom sizes for your partitions by following the steps in the optional section below. Begin by continuing with these steps:

    Begin the installation of Windows with your answer file present.

    Setup will pause at the screen that asks Where do you want to install Windows?. If you want anything other than default partition sizes for EFI and the recovery tools partition with this method, then follow these steps. If you simply want Windows to use default partition sizes, skip past this optional section.

    Optional steps to create partitions to custom sizes when omitting the DiskConfiguration block

    At the screen where Windows asks Where do you want to install Windows?, press SHIFT + F10 to open a command prompt.

    Run the following commands (read the comments afterward before you actually do this):

    Code:
    diskpart
    select disk 0
    clean
    convert gpt
    create partition efi size=260
    format fs=fat32 quick label="System"
    create partition msr size=128
    create partition primary
    shrink desired=2048 minimum=2048
    format fs=ntfs quick label="Windows"
    create partition primary
    format fs=ntfs quick label="Recovery Tools"
    set id=de94bba4-06d1-4d40-a16a-bfd50179d6ac
    gpt attributes 0x8000000000000001
    exit
    exit
    Notes about the above commands:

    1) For the select disk command, I am specifying disk 0 in the above example. Make sure to select the correct disk here as we will wipe out all data on this disk. If you are not certain which disk to select, then try running these commands before the select disk command:

    select disk 0
    list disk
    detail disk

    This will show details for the disk, hopefully allowing you to determine if this is the correct disk. Repeat those same three commands for disk 1, 2, etc. until you determine the correct disk. When you have determined the correct disk, then continue with the select disk 0 (or whatever number you determined) above.

    2) For the EFI partition, note that I specify a size of 260 MB. Normally, 100 MB would be fine, EXCEPT when installing on an Advanced 4k Format drive. On those drives the minimum size for a FAT32 partition is 260 MB so I have made it my practice to simply always use 260 MB since that will work on anything.

    TIP: You can try 100 MB. If you get an error message that says The volume size is too small when you run the command format fs=fat32 quick quick label="System", then repeat these commands starting with the clean command and use a size of 260 when you get to the command creating the EFI partition.

    3) The shrink command is where the magic happens. When we issued the create partition primary command just prior to this, note that we specified no size. This causes this partition to be created with all remaining space on the drive. We are now shrinking that partition by the amount of space that we want for the recovery tools partition. You will note that I am specifying a size of 2 GB (2,048 MB) in the example above. This is WAY overkill, but I'm doing this because I have plenty of space and the whole idea of this exercise is to ensure enough room for future upgrades. In my latest test installation of Windows 11, I ended up with a size of 750 MB, so my suggestion would be to go with that size as a minimum. If you have enough space to do so I would suggest a minimum of 1 GB (1,024 MB) to allow for some expansion. DO NOT use commas in the values specified. Use ONLY numbers.

    4) In the gpt attributes command, between the "x" and the "1" there are fourteen zeros.

    End of Notes

    End of Optional Section

    If you performed the optional steps above by partitioning the drive with diskpart, make sure to click on Refresh to reflect the changes that you made with Diskpart. Select the large partition on the drive to install Windows to. This will be partition #3 with the label Windows.

    If you did not use the optional steps, then determine the disk to install onto, select each partition on that disk with the exception of the area listed as Unallocated Space, and delete each partition. You will end up with only one reference to that drive number which will be shown as Unallocated Space. Select that as the destination for the installation.

    Setup will now continue unattended.

    Done!


    Option 2 - Create a batch file script and inject it into Windows Setup

    Make the following changes to your answer file by loading it in the Windows SIM (System Image Manager).

    Add Setup > RunSynchronous > RunSynchronousCommand to Pass 1 windowsPE.

    Set the following values:

    Order: 1
    Path: X:\CreatePartitions-UEFI.bat

    NOTE: If you have other RunSynchronousCommand entries and Order 1 is already in use then use the next available, unused number.

    Go to Setup > ImageInstall > OSImage > InstallTo and change PartitionID from 4 to 3.

    Either mount the Windows ISO image file or connect the Windows media that you intend to use for installation to your computer. Copy the file contents to your HD. I'm going to assume C:\Project\ISO_Files as the location in my examples below.

    Create three additional folders:

    C:\Project\WinPE_Mount
    C:\Project\WinPE
    C:\Project\Assets

    From C:\Project\ISO_Files\Sources copy the file boot.wim to C:\Project\WinPE with this command:

    copy /B C:\Project\ISO_Files\sources\boot.wim C:\Project\WinPE

    The boot.wim file contains two indices. We only care about index 2 (this is Windows setup) so we're simply going to export the first index without making any changes:

    dism /Export-Image /SourceImageFile:C:\Project\WinPE\boot.wim /SourceIndex:1 /DestinationImageFile:C:\Project\Assets\boot.wim

    Mount index 2:

    dism /mount-image /imagefile:C:\Project\WinPE\boot.wim /index:2 /mountdir:C:\Project\WinPE_Mount

    Copy the below text to a text file and name it CreatePartitions-UEFI.bat. Save that batch file in the folder C:\Project\WinPE_Mount.


    Code:
    @echo off
     
    :: Last edited Oct 2, 2023
     
    :: Tech Note: The EFI partition size only needs to be 100 MB, but minimum partition size on an advanced format 4K drive
    :: is 260 MB. As a result I specify 260 MB below for best compatibility. In addition, the size of the recovery tools partition
    :: is determined by the value for the "shrink" command below. I am using 2 GB (2,048 MB). This may be overkill for you.
    :: Please feel free to adjust this size.
    ::
    :: VERY IMPORTANT: Replace "disk 0" with the correct disk number because this will wipe the disk!
     
    echo Partitioning the HD. Please standby....
     
    (echo select disk 0
    echo clean
    echo convert gpt
    echo create partition efi size=260
    echo format quick fs=fat32 label="System"
    echo assign letter="S"
    echo create partition msr size=128
    echo create partition primary
    echo shrink minimum=2048
    echo format quick fs=ntfs label="Windows"
    echo assign letter="W"
    echo create partition primary
    echo format quick fs=ntfs label="Recovery tools"
    echo assign letter="R"
    echo set id="de94bba4-06d1-4d40-a16a-bfd50179d6ac"
    echo gpt attributes=0x8000000000000001
    echo exit
    ) | diskpart > NUL
    NOTES:

    The batch file assumes that Windows will be installed to disk 0. If that is not the case, please modify the batch file as needed. If you are not certain of the disk number, you can do one of the following:

    1) Disconnect all other disks from the system temporarily until Windows is installed. This ensures that the disk to which you are installing will be disk 0 since it is the only disk present.

    2) Boot from your Windows install media (without an answer file!) and run diskpart to determine the disk ID of the disk to which you wish to install Windows.

    The batch file is what will now create the partitions on the HD rather than the entries that were previously specified in the answer file. This works because the RunSynchronousCommand we created to run the batch is one of the first actions that setup takes. If you do not perform an unattended setup, you can leave the batch file in place since it will not affect anything.

    If you examine the batch file, you will note that it simply contains a diskpart script. The magic sauce is in the fact that diskpart can shrink a partition after creating it. So, after we create the Windows partition to occupy the entire remaining space of the disk, we shrink it by 2,048 MB (or whatever size you specify) giving us space for the recovery tools partition which we then create.

    END OF NOTES

    Cleanup the image, unmount it, mark it as being bootable, and export it with these commands:

    dism /Cleanup-Image /Image:"C:\Project\WinPE_Mount" /StartComponentCleanup

    dism /Unmount-Image /MountDir:"C:\Project\WinPE_Mount" /Commit

    dism /Export-Image /Bootable /SourceImageFile:C:\Project\WinPE\boot.wim /SourceIndex:2 /DestinationImageFile:C:\Project\Assets\boot.wim

    You will now find that you have a file called boot.wim in C:\Project\Assets. This is the boot.wim with the added batch file which will be used by the modified answer file. Simply copy the file back to the original location C:\ISO_Files\Sources. You can make a backup of the original boot.wim file in that location first if you like.

    You will need to create a new ISO image or for physical media, simply replace the original boot.wim with this new boot.wim file.

    You can make a new ISO image that includes the updated boot.wim with this command. Note that this is a single long command. Be careful – there are no spaces in some of the places you might expect a space to be present:

    oscdimg.exe -m -o -u2 -udfver102 -bootdata:2#p0,e,bc:\project\iso_files\boot\etfsboot.com#pEF,e,bc:\project\iso_files\efi\microsoft\boot\efisys.bin c:\project\iso_files "c:\Windows 11 22H2.iso"

    Replace the c:\Windows 11 22H2.iso at the end of the command with the correct path and name for the output file that you want to save. For paths with spaces, include them inside of double quote marks (").

    That is all!

    How this works

    The batch file is what will now create the partitions on the HD rather than the entries that were previously specified in the answer file. This works because the RunSynchronousCommand we created to run the batch file is one of the first actions that setup takes. If you do not perform an unattended setup, the batch file will not affect anything so it can remain here perfectly safely. Put another way, you can still use that same modified Windows image for a manual installation without unattended setup since the batch file will not alter the behavior of setup in any way.

    If you examine the batch file, you will note that it simply contains a diskpart script. The magic sauce is in the fact that diskpart can shrink a partition after creating it. So, after we create the Windows partition to occupy the entire remaining space of the disk, we shrink it giving us space for the recovery tools partition which we then create.

    When Windows setup starts, it ALWAYS creates a RAM drive that is assigned the drive letter X:. As a result, we know for a fact that our script will ALWAYS be on the X: drive.


    Option 3: Create a diskpart script on the fly and execute it

    Modify your answer file in the Windows SIM (System Image Manager). Start by adding the component Microsoft Windows Setup > RunSynchronous > RunSynchronousCommand to Pass 1 windowsPE.

    Set the following values:

    Order: 1
    Path: cmd.exe /c echo select disk 0 >> X:\diskpartUEFI.txt

    NOTE: If other RunSynchronousCommand entries are present, use the next available number for Order.

    IMPORTANT: In the above command, we specify disk 0. Make sure to select the correct disk for your system because that disk will be wiped clean! If you are not certain, you can do one of the following:

    1) Disconnect all other disks from the system temporarily until Windows is installed. This ensures that the disk to which you are installing will be disk 0 since it is the only disk present.

    2) Boot from your Windows install media (without an answer file!) and run diskpart to determine the disk ID of the disk to which you wish to install Windows.

    Repeat this process by continuing to add RunSynchronousCommand entries, incrementing the Order each time and adding the Path entry noted below for each entry. Note that you are adding a total of 16 entries here.

    NOTE: If you already have RunSynchronousCommand entries, then start the Order numbers with the next available unused number.

    Continue to add the following entries:

    Code:
    Order: 2
    Path: cmd.exe /c echo clean >> X:\diskpartUEFI.txt
     
    Order: 3
    Path: cmd.exe /c echo convert gpt >> X:\diskpartUEFI.txt
     
    Order: 4
    Path: cmd.exe /c echo create partition efi size=260 >> X:\diskpartUEFI.txt
     
    Order: 5
    Path: cmd.exe /c echo format quick fs=fat32 label="System" >> X:\diskpartUEFI.txt
     
    Order: 6
    Path: cmd.exe /c echo create partition msr size=128 >> X:\diskpartUEFI.txt
     
    Order: 7
    Path: cmd.exe /c echo create partition primary >> X:\diskpartUEFI.txt
     
    Order: 8
    Path: cmd.exe /c echo shrink desired=2048 minimum=2048 >> X:\diskpartUEFI.txt
     
    Order: 9
    Path: cmd.exe /c echo format quick fs=ntfs label="Windows" >> X:\diskpartUEFI.txt
     
    Order: 10
    Path: cmd.exe /c echo assign letter="W" >> X:\diskpartUEFI.txt
     
    Order: 11
    Path: cmd.exe /c echo create partition primary >> X:\diskpartUEFI.txt
     
    Order: 12
    Path: cmd.exe /c echo format quick fs=ntfs label="Recovery Tools" >> X:\diskpartUEFI.txt
     
    Order: 13
    Path: cmd.exe /c echo set id="de94bba4-06d1-4d40-a16a-bfd50179d6ac" >> X:\diskpartUEFI.txt
     
    Order: 14
    Path: cmd.exe /c echo gpt attributes=0x8000000000000001 >> X:\diskpartUEFI.txt
     
    Order: 15
    Path: cmd.exe /c echo exit >> X:\diskpartUEFI.txt
     
    Order: 16
    Path: cmd.exe /c diskpart.exe /s X:\DiskPartUEFI.txt
    That's it. When this answer file is used it will create the partitions with the recovery tools partition last. Installation will be completely unattended.

    How this works

    Windows setup ALWAYS creates a RAM Drive with the drive letter X:. We take advantage of this by using a sequence of RunSynchronousCommand entries to build a diskpart script that we save in X:\diskPartUEFI.txt. We then run diskpart pointing it to X:\DiskPartUEFI.txt as the source of commands to be run.
      My Computers


  9. Posts : 4,094
    Windows 11 Pro, 22H2
       #59

    I will post some complete sample answer files later today (Tuesday) complete with comments to make following easier. For now, it's time for some sleep
      My Computers


  10. Posts : 2
    Windows 11
       #60

    hsehestedt said:
    I will post some complete sample answer files later today (Tuesday) complete with comments to make following easier. For now, it's time for some sleep
    Omg yes. Wow, I'm so amazed, you got back to me on this so quickly. Totally unexpected! I'm very impressed by your thorough detail. The method "Modify the Answer File to Create a Diskpart Script on the Fly" is the one I'm most interested in, but I am very interested in all 3. Thanks for going into so much detail on all 3! I await your sample answer files
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 06:24.
Find Us




Windows 10 Forums