Windows 11 unattended installation


MisterEd

Well-known member
Power User
VIP
Local time
2:40 PM
Posts
1,147
Location
Huntsville, AL
Visit site
OS
Windows 11 Pro 24H2

My Computers

System One System Two

  • OS
    Windows 11 Pro 24H2
    Computer type
    Laptop
    Manufacturer/Model
    ASUS TUF Gaming A15 (2022)
    CPU
    AMD Ryzen 7 6800H with Radeon 680M GPU (486MB RAM)
    Memory
    Crucial DDR5-4800 (2400MHz) 32GB (2 x 16GB)
    Graphics Card(s)
    NVIDIA RTX 3060 Laptop (6GB RAM)
    Sound Card
    n/a
    Monitor(s) Displays
    15.6-inch
    Screen Resolution
    1920x1080 300Hz
    Hard Drives
    2 x Samsung 980 (1TB M.2 NVME SSD)
    PSU
    n/a
    Mouse
    Wireless Mouse M510
    Internet Speed
    2000Mbps/300Mbps
    Browser
    Firefox
    Antivirus
    Malwarebytes
  • Operating System
    Windows 11 Pro 23H2
    Computer type
    PC/Desktop
    Manufacturer/Model
    Custom build
    CPU
    AMD Ryzen 7 3700X
    Motherboard
    ASUS PRIME X370-PRO
    Memory
    G.SKILL Flare X 32GB (2x16GB) DDR4
    Graphics card(s)
    ASUS ROG-STRIX-RTX3060TI-08G-V2-GAMING (RTX 3060-Ti, 8GB RAM)
    Monitor(s) Displays
    Samsung S23A300B (23-in LED)
    Screen Resolution
    1080p 60Hz
    Hard Drives
    2TB XPG SX8200 Pro (M2. PCIe SSD) || 2TB Intel 660P (M2. PCIe SSD) ||
    PSU
    Corsair RM750x (750 watts)
    Case
    Cooler Master MasterCase 5
    Cooling
    Corsair H60 AIO water cooler
    Mouse
    Logitech K350 (wireless)
    Keyboard
    Logitech M510 (wireless)
    Internet Speed
    2000 Mbps down / 300 Mbps up
    Browser
    Firefox, Edge, Chrome
    Antivirus
    Malwarebytes (Premium)
    Other Info
    ASUS Blu-ray Burner BW-16D1HT (SATA) || Western Digital Elements 12TB USB 3.0 external hard drive used with Acronis True Image backup software || HP OfficeJet Pro 6975 Printer/Scanner
Christoph Schneegans' autounattend.xml generator is the most technically advanced (and correct) site I've seen so far. The list of functions it handles is staggering:
- BypassTPM​
- BypassRNO​
- disable Device Encryption for Home​
- disk layout, including using diskpart-style commands​
- correctly remove OneDrive before it activates​
- correctly disable Defender using the right Services (I've seen so many "experts" get this one wrong)​
- enable RDP​
- handle up to 3 multiple keyboard layouts​
- remove most of the Default Apps, though it cannot remove non-removable apps (which can't be done in Unattended mode)​
- disable pinning of 3rd-party Suggested Apps (remember the English-World fake hack? It's done correctly here).​

Apologies to @hsehestedt, but I would recommend newbies use this site since it handles most of the commonly asked scenarios.

I asked him to fix two bugs, and he quickly rolled them into the generator by the next day.
 

My Computer

System One

  • OS
    Windows 7
Apologies to @hsehestedt, but I would recommend newbies use this site since it handles most of the commonly asked scenarios.

Garlin, no apologies needed at all. In fact, I'll check this out myself. I'm curious to see if it works where some of my existing answer files are failing. My previously existing answer file that perform fully unattended installations all still work, but I had some abbreviated answer files that do NOT perform a full unattended installation that are failing with 24H2. For example, I have one that does nothing other than bypass Win 11 requirements and create a local account. That one is failing.

My main objection to these generators in the past was that they frequently created bad answer files. Many times, especially on TenForums, I encountered people who had bad answer files generated by such web sites.

Sometime in the next couple days I'll try that site and report back how it worked with 24H2.
 

My Computers

System One System Two

  • OS
    Win11 Pro 24H2
    Computer type
    PC/Desktop
    Manufacturer/Model
    Kamrui Mini PC, Model CK10
    CPU
    Intel i5-12450H
    Memory
    32GB
    Graphics Card(s)
    No GPU - Built-in Intel Graphics
    Sound Card
    Integrated
    Monitor(s) Displays
    HP Envy 32
    Screen Resolution
    2560 x 1440
    Hard Drives
    1 x 2TB NVMe SSD
    1 x 4TB NVMe SSD
    1 x 4TB 2.5" SSD
    PSU
    120W "Brick"
    Keyboard
    Corsair K70 Mechanical Keyboard
    Mouse
    Logitech MX Master 3
    Internet Speed
    1Gb Up / 1 Gb Down
    Browser
    Edge
    Antivirus
    Windows Defender
  • Operating System
    Win11 Pro 23H2
    Computer type
    Laptop
    Manufacturer/Model
    Lenovo ThinkBook 13x Gen 2
    CPU
    Intel i7-1255U
    Memory
    16 GB
    Graphics card(s)
    Intel Iris Xe Graphics
    Sound Card
    Realtek® ALC3306-CG codec
    Monitor(s) Displays
    13.3-inch IPS Display
    Screen Resolution
    WQXGA (2560 x 1600)
    Hard Drives
    2 TB 4 x 4 NVMe SSD
    PSU
    USB-C / Thunderbolt 4 Power / Charging
    Mouse
    Buttonless Glass Precision Touchpad
    Keyboard
    Backlit, spill resistant keyboard
    Internet Speed
    1Gb Up / 1Gb Down
    Browser
    Edge
    Antivirus
    Windows Defender
    Other Info
    WiFi 6e / Bluetooth 5.1 / Facial Recognition / Fingerprint Sensor / ToF (Time of Flight) Human Presence Sensor
My main objection to these generators in the past was that they frequently created bad answer files. Many times, especially on TenForums, I encountered people who had bad answer files generated by such web sites.
I've seen too many bad answer files which looked like someone used WSIM, or found a WSIM-created file, and hacked them the wrong because they didn't understand the XML structure.

Unfortunately, there's never been an answer file checker. You just have to run an install to find out.
 

My Computer

System One

  • OS
    Windows 7
@garlin,

I'm realizing as I look at that answer file generator that I owe you a big thanks. I see that they have a lot of options that I have never used, but some of them were on my list of things to figure out how to do. It dawned on me as I was looking at this that I can now simply dissect answer files that I can generate up there to figure those things out.

Well, looks like I have a few days of going down the rabbit hole and testing to teach myself some new tricks.

Thanks, Garlin!
 

My Computers

System One System Two

  • OS
    Win11 Pro 24H2
    Computer type
    PC/Desktop
    Manufacturer/Model
    Kamrui Mini PC, Model CK10
    CPU
    Intel i5-12450H
    Memory
    32GB
    Graphics Card(s)
    No GPU - Built-in Intel Graphics
    Sound Card
    Integrated
    Monitor(s) Displays
    HP Envy 32
    Screen Resolution
    2560 x 1440
    Hard Drives
    1 x 2TB NVMe SSD
    1 x 4TB NVMe SSD
    1 x 4TB 2.5" SSD
    PSU
    120W "Brick"
    Keyboard
    Corsair K70 Mechanical Keyboard
    Mouse
    Logitech MX Master 3
    Internet Speed
    1Gb Up / 1 Gb Down
    Browser
    Edge
    Antivirus
    Windows Defender
  • Operating System
    Win11 Pro 23H2
    Computer type
    Laptop
    Manufacturer/Model
    Lenovo ThinkBook 13x Gen 2
    CPU
    Intel i7-1255U
    Memory
    16 GB
    Graphics card(s)
    Intel Iris Xe Graphics
    Sound Card
    Realtek® ALC3306-CG codec
    Monitor(s) Displays
    13.3-inch IPS Display
    Screen Resolution
    WQXGA (2560 x 1600)
    Hard Drives
    2 TB 4 x 4 NVMe SSD
    PSU
    USB-C / Thunderbolt 4 Power / Charging
    Mouse
    Buttonless Glass Precision Touchpad
    Keyboard
    Backlit, spill resistant keyboard
    Internet Speed
    1Gb Up / 1Gb Down
    Browser
    Edge
    Antivirus
    Windows Defender
    Other Info
    WiFi 6e / Bluetooth 5.1 / Facial Recognition / Fingerprint Sensor / ToF (Time of Flight) Human Presence Sensor
What's really clever is the use of the XML to hide scripting code in blocks that Windows doesn't care about. This gets around the 251 character limit and special character escaping for RunSynchronous commands.

It's kinda like the hybrid CMD/PS scripts some of us have been writing. Having a dummy XML payload allows him to embed a more features into a PS execution script so it can be easily extended without worrying about Windows Setup. The only limitation is he has to "live off the land" and only use native commands available to WinPE or a clean Windows install.
 

My Computer

System One

  • OS
    Windows 7
I'm not really understanding what you mean. I created a sample answer file for myself on the web site, and I see all the usual RunSynchronous entries. Any chance of pointing me to an example? What you are saying sounds interesting but I'm just not following somehow.
 

My Computers

System One System Two

  • OS
    Win11 Pro 24H2
    Computer type
    PC/Desktop
    Manufacturer/Model
    Kamrui Mini PC, Model CK10
    CPU
    Intel i5-12450H
    Memory
    32GB
    Graphics Card(s)
    No GPU - Built-in Intel Graphics
    Sound Card
    Integrated
    Monitor(s) Displays
    HP Envy 32
    Screen Resolution
    2560 x 1440
    Hard Drives
    1 x 2TB NVMe SSD
    1 x 4TB NVMe SSD
    1 x 4TB 2.5" SSD
    PSU
    120W "Brick"
    Keyboard
    Corsair K70 Mechanical Keyboard
    Mouse
    Logitech MX Master 3
    Internet Speed
    1Gb Up / 1 Gb Down
    Browser
    Edge
    Antivirus
    Windows Defender
  • Operating System
    Win11 Pro 23H2
    Computer type
    Laptop
    Manufacturer/Model
    Lenovo ThinkBook 13x Gen 2
    CPU
    Intel i7-1255U
    Memory
    16 GB
    Graphics card(s)
    Intel Iris Xe Graphics
    Sound Card
    Realtek® ALC3306-CG codec
    Monitor(s) Displays
    13.3-inch IPS Display
    Screen Resolution
    WQXGA (2560 x 1600)
    Hard Drives
    2 TB 4 x 4 NVMe SSD
    PSU
    USB-C / Thunderbolt 4 Power / Charging
    Mouse
    Buttonless Glass Precision Touchpad
    Keyboard
    Backlit, spill resistant keyboard
    Internet Speed
    1Gb Up / 1Gb Down
    Browser
    Edge
    Antivirus
    Windows Defender
    Other Info
    WiFi 6e / Bluetooth 5.1 / Facial Recognition / Fingerprint Sensor / ToF (Time of Flight) Human Presence Sensor
For example (scroll down to the end).

Normally, you would write 10-15 RunSynchronous commands in a row to concatenate script text into a single file, before executing it. This way he can append as many custom scripts as he wants without making the XML too complicated to read. If you wanted to study an included script, it's much easier to understand. Remember how cumbersome your diskpart solution was? It was a lot of split lines because you're stuck doing the usual way.

If you look into what's he's doing, it will possible to add entire CMD or PS scripts or commands into the autounattend.xml, without needing to copy them to the ISO. One function will extract an embedded script from the XML block and saves it to a file. The other function can then run the saved scripts. It's like a self-extracting script running inside Unattended mode.
 

My Computer

System One

  • OS
    Windows 7
Wow, I see it. But that's going to take me some doing to fully make heads or tails out of it.

Some other observations from my testing:

I had previously mentioned that some of my existing answer files were no longer working with 24H2. I found the problem...

In my answer files, if I am not specifying a particular index number to install, or I am not specifying to edition to be installed by refereeing the unique NAME or DESCRIPTION of the edition to be installed, I always included this in my answer file:

XML:
            <ImageInstall>
                <OSImage>
                    <InstallFrom>
                        <Path>\install.wim</Path>
                    </InstallFrom>
                </OSImage>
            </ImageInstall>

Apparently, setup does not like that any longer. I simply had to remove that block and now all is well.
 

My Computers

System One System Two

  • OS
    Win11 Pro 24H2
    Computer type
    PC/Desktop
    Manufacturer/Model
    Kamrui Mini PC, Model CK10
    CPU
    Intel i5-12450H
    Memory
    32GB
    Graphics Card(s)
    No GPU - Built-in Intel Graphics
    Sound Card
    Integrated
    Monitor(s) Displays
    HP Envy 32
    Screen Resolution
    2560 x 1440
    Hard Drives
    1 x 2TB NVMe SSD
    1 x 4TB NVMe SSD
    1 x 4TB 2.5" SSD
    PSU
    120W "Brick"
    Keyboard
    Corsair K70 Mechanical Keyboard
    Mouse
    Logitech MX Master 3
    Internet Speed
    1Gb Up / 1 Gb Down
    Browser
    Edge
    Antivirus
    Windows Defender
  • Operating System
    Win11 Pro 23H2
    Computer type
    Laptop
    Manufacturer/Model
    Lenovo ThinkBook 13x Gen 2
    CPU
    Intel i7-1255U
    Memory
    16 GB
    Graphics card(s)
    Intel Iris Xe Graphics
    Sound Card
    Realtek® ALC3306-CG codec
    Monitor(s) Displays
    13.3-inch IPS Display
    Screen Resolution
    WQXGA (2560 x 1600)
    Hard Drives
    2 TB 4 x 4 NVMe SSD
    PSU
    USB-C / Thunderbolt 4 Power / Charging
    Mouse
    Buttonless Glass Precision Touchpad
    Keyboard
    Backlit, spill resistant keyboard
    Internet Speed
    1Gb Up / 1Gb Down
    Browser
    Edge
    Antivirus
    Windows Defender
    Other Info
    WiFi 6e / Bluetooth 5.1 / Facial Recognition / Fingerprint Sensor / ToF (Time of Flight) Human Presence Sensor
WinPE setup runs from the X: drive. You can confirm this by copying Process Explorer to the ISO, and running it.

<Path> is supposed to be an absolute local pathname or UNC share. I'm surprised Setup's been allowing you to get away with a relative path, since that would be "X:\install.wim".
 

My Computer

System One

  • OS
    Windows 7
WinPE setup runs from the X: drive. You can confirm this by copying Process Explorer to the ISO, and running it.

<Path> is supposed to be an absolute local pathname or UNC share. I'm surprised Setup's been allowing you to get away with a relative path, since that would be "X:\install.wim".

Probably entirely my fault, it's been something I've used for several years now and never had a problem with it. I seem to recall that I could not get Windows to install unattended unless I had that entry in place OR I specified a specific index, name, or description to designate the edition to be installed. But it's too long ago to recall the specific circumstances.

But it seems now that I can entirely omit that block.

I do have one ISO image that has about a dozen editions of Windows on it, all of them Windows Pro edition. For that image, I have to specify an index, name, or description. This is because, if I simply specify that I am installing Windows Pro via the generic key, that is not enough info since all of the editions in this image are Pro. Unattended setup gets paused and I am asked to select the edition to install unless I specify a particular index, name, or description.
 

My Computers

System One System Two

  • OS
    Win11 Pro 24H2
    Computer type
    PC/Desktop
    Manufacturer/Model
    Kamrui Mini PC, Model CK10
    CPU
    Intel i5-12450H
    Memory
    32GB
    Graphics Card(s)
    No GPU - Built-in Intel Graphics
    Sound Card
    Integrated
    Monitor(s) Displays
    HP Envy 32
    Screen Resolution
    2560 x 1440
    Hard Drives
    1 x 2TB NVMe SSD
    1 x 4TB NVMe SSD
    1 x 4TB 2.5" SSD
    PSU
    120W "Brick"
    Keyboard
    Corsair K70 Mechanical Keyboard
    Mouse
    Logitech MX Master 3
    Internet Speed
    1Gb Up / 1 Gb Down
    Browser
    Edge
    Antivirus
    Windows Defender
  • Operating System
    Win11 Pro 23H2
    Computer type
    Laptop
    Manufacturer/Model
    Lenovo ThinkBook 13x Gen 2
    CPU
    Intel i7-1255U
    Memory
    16 GB
    Graphics card(s)
    Intel Iris Xe Graphics
    Sound Card
    Realtek® ALC3306-CG codec
    Monitor(s) Displays
    13.3-inch IPS Display
    Screen Resolution
    WQXGA (2560 x 1600)
    Hard Drives
    2 TB 4 x 4 NVMe SSD
    PSU
    USB-C / Thunderbolt 4 Power / Charging
    Mouse
    Buttonless Glass Precision Touchpad
    Keyboard
    Backlit, spill resistant keyboard
    Internet Speed
    1Gb Up / 1Gb Down
    Browser
    Edge
    Antivirus
    Windows Defender
    Other Info
    WiFi 6e / Bluetooth 5.1 / Facial Recognition / Fingerprint Sensor / ToF (Time of Flight) Human Presence Sensor

Latest Support Threads

Back
Top Bottom