Last active 1748795655

Revision d736cf75487abc7359614743ac1246cd0fba9676

win-usb-from-iso Raw
1# How to create Windows setup USB media from ISO
2
3## Download the ISO
4
5Download the Windows ISO from MSDN, with Media Creation Tool (burn to disc later) or visit [this](https://www.microsoft.com/hu-hu/software-download/windows11), select ISO, select language and go. Or, visit [UUPDump (experimental)](https://uupdump.net/).
6
7## Attach ISO
8
9Right click on the ISO, open with Windows explorer and it will appear as a DVD drive.
10
11## Burn to USB
12
13### Prepare the disk to burn the Windows ISO on it.
14
15Open an admin CMD, Powershell (Win+r, cmd, ctrl-shift-enter).
16Type `diskpart` and `list disk`. Select the pendrive (for example 1).
17`select disk 1`. Type `clean`, it will delete everything from it. Type `create partition primary` to create primary part. Type `format quick fs=fat32 label=windows` to format it.
18> wit this FAT32 method you can boot it on BIOS/legacy and UEFI compliant systems.
19Finaly type `active` and `assign` to assign letter to partition.
20
21### Burn the ISO
22
23As the FAT32 filesystem allow a maximum of ~4,2 GB per file limit, we can not copy the entire Windows setup to the drive.
24
25Select everything on the newly attached DVD drive in the first steps and copy all to the pendrive. Itt will do the job and throw an error that states `can not copy install.wim`. It is not a problem, split it to multiple files to bypass FAT32 size limit.
26
27Open the DVD drive where ISO mounted, open sources, and copy the install.wim path by pressing CTRL-SHIFT-c on it or shift+rightclick and copy as path.
28Paste it into a notepad. Create a destination folder where we write the splited install.swm files and after them copy to the pendrive's sources folder.
29> If you're brave, simply use the sources folder on the pendrive.
30Create the folder and copy the folder path (as install.wim's) to the notepad.
31
32Replace the source and SWMFile (destination) in this command.
33`Dism /Split-Image /ImageFile:E:\sources\install.wim /SWMFile:F:\sources\install.swm /FileSize:3200`
34
35Open an elevated (administrator) CMD as in the diskpart step and paste the above dism command. It will produce install.swm, install2.swm and if you do not set the pendrive sources folder as destination, copy and paste the results. If the files appeared in the sources folder, job done.
36
37## Bypass Windows 11 system requirements
38
39To bypass the system requirement checks, simply open the `appraiserres.dll` in the sources folder in notepad and remove all contents so produce and empty file (no, do not delete the file itself, only it's contents!).
40
41## Create local account and autounattend during setup
42
43If you want to create a local user account, create an `autounattend.xml` file in the root of the pendrive directory and fill up (replace data if needed).
44
45```
46<?xml version="1.0"?>
47<unattend xmlns="urn:schemas-microsoft-com:unattend">
48 <settings pass="oobeSystem">
49 <component language="neutral" name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
50 <UserAccounts>
51 <LocalAccounts>
52 <LocalAccount wcm:action="add">
53 <Password>
54 <PlainText>true</PlainText>
55 <Value>myuserpassw0rd</Value>
56 </Password>
57 <DisplayName>My User</DisplayName>
58 <Group>Administrators</Group>
59 <Name>myuser</Name>
60 </LocalAccount>
61 </LocalAccounts>
62 </UserAccounts>
63 </component>
64 </settings>
65</unattend>
66```
67
68If you want your own autounattend.xml file, visit [this](https://schneegans.de/windows/unattend-generator/) link.
69
70## Bypass internet connection during setup
71
72If you want this, the best idea is to prefill the OOBE (Out Of The Box Experience) in autounattend.xml (see link above). The `OOBE\bypassnro.cmd` method is not work properly in the recent Win11 editions so better idea to use regular ways. Oh, and do not forget to disconnect the ethernet cable.
73However in regular situations it is not needed as the previous local user creation method will bypass the MS account for you.
74
75More tips coming soon...