Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Universal MediaCreationTool wrapper for all MCT Windows 10 versions from 1507 to 21H1 with business (Enterprise) edition support

We did it! We broke gist.github.com ;) So head over to the new home! Thank you all!
2021.10.20: https://github.com/AveYo/MediaCreationTool.bat now open for interaction

  • new update introducing no 11 setup checks on boot in VirtualBox

Not just an Universal MediaCreationTool wrapper script with ingenious support for business editions,
Preview
A powerful yet simple windows 10 / 11 deployment automation tool as well!

configure via set vars, commandline parameters or rename script like iso 21H2 Pro MediaCreationTool.bat
recommended windows setup options with the least amount of issues on upgrades set via auto.cmd
awesome dialogs with keyboard focus to pick target version and preset action

Auto Setup with detected media without confirmation
- can troubleshoot upgrade failing by adding no_update to script name
Create ISO with detected media in C:\ESD folder without confirmation
- can override detected media by adding edition name / language / arch to script name
Create USB with detected media after confirmation
- can click Back and select ISO instead to save in a different path
custom presets above support 'oem' media customization, that can be disabled by adding no_oem to script name
- pickup $OEM$ folder (if it exists) with any post setup tweaks like $OEM$\$$\Setup\Scripts\setupcomplete.cmd
- write sources\PID.txt file to preselect edition at media boot or setup within windows (if configured)
- write auto.cmd file to re-run auto setup on demand, from media (includes Skip TPM if sources are 11)
- write winpeshl.ini file in boot.wim to Skip TPM Check on media boot (if sources are 11)
Select in MCT with manual confirmation for everything in MCT GUI
- no 'oem' media customization, script passes products.xml configuration and quits without touching media

Skip TPM Check on Dynamic Update v1 (wmi-based) or v2 (ifeo-based) standalone toggle scripts in MCT\ dir
- system-wide, unblocks insider previews on windows update, or running setup.exe manually while online
- when using created media on another pc for the first time, can launch auto.cmd from media once to enable

discuss on MDL

2018.10.10: reinstated 1809 [RS5]! using native xml patching for products.xml; fixed syntax bug with exit/b
2018.10.12: added data loss warning for RS5
2018.11.13: RS5 is officially back! + greatly improved choices dialog - feel free to use the small snippet in your own scripts
2019.05.22: 1903 [19H1]
2019.07.11: 1903 __release_svc_refresh__ and enable DynamicUpdate by default to grab latest CU
2019.09.29: UPDATED 19H1 build 18362.356 ; RS5 build 17763.379 and show build number
            added LATEST MCT choice to dinamically download the current version (all others have hard-coded links)
2019.11.16: 19H2 18363.418 as default choice (updated hard-coded links)
2020.02.29: 19H2 18363.592
2020.05.28: 2004 19041.264 first release
2020.10.29: 20H2 and aniversary script refactoring to support all MCT versions from 1507 to 20H2!!!
2020.10.30: hotfix utf-8, enterprise on 1909+
2020.11.01: fix remove unsupported options in older versions code breaking when path has spaces.. pff
2020.11.14: generate latest links for 1909,2004; all xml editing now in one go; resolved known cannot run script issues
2020.11.15: one-time clear of cached MCT, as script generates proper 1.0 catalog for 1507,1511,1703 since last update
            fixed compatibility with naked windows 7 powershell 2.0 / IPv6 / optional import $OEM$ / 1803+ business typo
            updated executables links for 1903 and 2004
2020.11.17: parse first commandline parameter as version, example: MediaCreationTool.bat 1909
2020.12.01: attempt to fix reported issues with 1703; no other changes (skipping 19042.630 leaked esd because it is broken)
2020.12.11: 20H2 19042.631; fixed pesky 1703 decryption bug on dual x86 + x64; improved cleanup; label includes version
2021.03.20: pre-release 21H1; optional auto upgrade or create media presets importing $OEM$ folder and key as PID.txt
2021.05.23: 21H1 release; enhanced script name args parsing, upgrade from embedded, auto.cmd / PID.txt / $OEM$ import
2021.06.06: create iso directly; enhanced dialogs; args from script name or commandline; refactoring is complete!
2021.08.04: done fiddling
2021.09.03: 21H2, both 10 and 11 [unreleased]
2021.09.25: Windows 11
            with Skip TPM Check on media boot as well as on dynamic update (standalone toggle script available)
            final touches for improved script reliability; enhanced auto upgrade preset; win 7 powershell 2.0 compatible
2021.09.30: fix Auto Setup preset not launching.. automatically
2021.10.04: fix for long standing tr localization quirks; Skip TPM Check v2 (ifeo-based instead of wmi)
2021.10.05: 11 22000.194 Release (rofl W11 MCT has limited capabilities, so still using 21H1 MCT because it works fine)
2021.10.09: outstanding refactoring around Windows 11 MCT; minimize while waiting MCT; unified 7 - 11 appearence
            We broke gist.github.com ;) Script has a new home now: https://github.com/AveYo/MediaCreationTool.bat 

use download ZIP button or pastebin link to get the script, as saving the Raw file breaks line endings

* text=auto
* eol=crlf
@StijnBousard
Copy link

StijnBousard commented Oct 12, 2021

Tremendous - Windows 11 is now nearly a week on my 11 years old Dell Studio XPS 1647, and I'm not experiencing any misbehaviour at all! Thanks, AveYo!

How is the perf? especially with the mouse? Is it not stuttering? How about right-clicking the desktop, isn't it so delayed?

No, everything works fine without delay or stuttering. Over time, I have equipped my 11 years old Dell laptop with 8 GB RAM (instead of 4) and an SSD drive (Samsung SSD 850 EVO).

@Akanaoi
Copy link

Akanaoi commented Oct 13, 2021

Tremendous - Windows 11 is now nearly a week on my 11 years old Dell Studio XPS 1647, and I'm not experiencing any misbehaviour at all! Thanks, AveYo!

How is the perf? especially with the mouse? Is it not stuttering? How about right-clicking the desktop, isn't it so delayed?

No, everything works fine without delay or stuttering. Over time, I have equipped my 11 years old Dell laptop with 8 GB RAM (instead of 4) and an SSD drive (Samsung SSD 850 EVO).

May I know if you did a CLEAN INSTALL or is it in UPGRADE way (retaining installed programs from Windows 10)

@StijnBousard
Copy link

StijnBousard commented Oct 13, 2021

Tremendous - Windows 11 is now nearly a week on my 11 years old Dell Studio XPS 1647, and I'm not experiencing any misbehaviour at all! Thanks, AveYo!

How is the perf? especially with the mouse? Is it not stuttering? How about right-clicking the desktop, isn't it so delayed?

No, everything works fine without delay or stuttering. Over time, I have equipped my 11 years old Dell laptop with 8 GB RAM (instead of 4) and an SSD drive (Samsung SSD 850 EVO).

May I know if you did a CLEAN INSTALL or is it in UPGRADE way (retaining installed programs from Windows 10)

I did an upgrade, keeping installed apps and files. Meanwhile, I have 'repaired' one app (Dynamic Theme). All other stuff seems to work without problems.

@dakhama-mehdi
Copy link

dakhama-mehdi commented Oct 13, 2021

Hello family, CMC-ISO based on this script is available in the Store with new version, he offres you tthe possibility to download authentic Win11 from microsoft site with any language
-check the hash and authenticity of your ISO
-and create a real and original media boot without hack or bypass

links to CMC-iso : https://www.microsoft.com/fr-fr/p/cmc-iso/9nh84mp1s1r5?activetab=pivot:overviewtab

@epman100
Copy link

epman100 commented Oct 13, 2021

rufus-3.16_BETA2.exe can create non-tpm and non-secure boot modified isos's when writing images now! :)

3.16 of rufus now final

and yes the Win11 KB5006674 CU get installed on any Win11 build 22000.x system

@ValZapod
Copy link

ValZapod commented Oct 13, 2021

and yes the Win11 KB5006674 CU get installed on any

And yes it was available yesterday here too https://www.catalog.update.microsoft.com/Search.aspx?q=KB5006674

@Ziya259
Copy link

Ziya259 commented Oct 14, 2021

If I click "Upgrade this PC", will it still install the version I picked?

If you click "Auto Setup", you will take some bags. You must choose only "Create USB" And you will have the best OS in the world

@Ziya259
Copy link

Ziya259 commented Oct 14, 2021

Guys. You must choose only Create USB. If you choose other modes, you will have many bugs with settings and e.t.r

@StijnBousard
Copy link

StijnBousard commented Oct 14, 2021

Guys. You must choose only Create USB. If you choose other modes, you will have many bugs with settings and e.t.r

I used Create ISO twice and Auto Setup once, without problems!

@SDCode1
Copy link

SDCode1 commented Oct 14, 2021

Win 11 didn't seem compatible with my computer for lack of TPM. Thanks to this tool, I was able to install Win 11 on a virtual machine without TPM. Thank you for making this tool.

I created an ISO and booted the Win 11 installation within a VM, then performed a clean Win 11 installation. So far so good.

Even though Win 11 requirements says 64GB storage minimum, the VM installation required only a minimum 52GB storage.

There were only options to install two Win 11 versions: Home and Pro.

Can this tool be used to install Win 11 Mixed Reality or Enterprise?

@mbiba
Copy link

mbiba commented Oct 16, 2021

What I am doing wrong? I am trying to run the script as administrator and nothing happens. Only TPM settings will open and three windows of World pad with error message of missing files:
image

@CauagamesDeveloper
Copy link

CauagamesDeveloper commented Oct 16, 2021

Trying to install Windows 11 Pro, no success.

I've tried to install Windows 11 in my laptop, also the same error (my laptop has Windows 10 Home Single Language version 1709)
Capturar
Is this the brazilian Microsoft servers overloaded? I checked the links of Windows 11 and they work, so why in the bat/powershell they dont work and download fails?

@aravon72
Copy link

aravon72 commented Oct 17, 2021

Trying to install Windows 11 Pro, no success.

I've tried to install Windows 11 in my laptop, also the same error (my laptop has Windows 10 Home Single Language version 1709) Capturar Is this the brazilian Microsoft servers overloaded? I checked the links of Windows 11 and they work, so why in the bat/powershell they dont work and download fails?

You need Windows 10 version 2004 in order to upgrade to Windows 11.
You can see it here: https://www.microsoft.com/en-gb/windows/windows-11-specifications

@aderito-carvalho
Copy link

aderito-carvalho commented Oct 17, 2021

Hello, when the zip script down it when decompact only has two files and does not have SKIP TPM and Media Creation .bat and SKIP TPMV2 and V1. Can you correspond?

@aderito-carvalho
Copy link

aderito-carvalho commented Oct 17, 2021

Hello When skip The ZIP file from the TPM skip does not come all files within the folder. Only two files come. Do not come by Skip TPM and Media Creation .Bat could correspond to the problem.

@aderito-carvalho
Copy link

aderito-carvalho commented Oct 17, 2021

Hello, when the zip file is not the script files inside the folder how do I have it? which does not have Media Creed and Skip TP. and SKIP TPM V1 and V2. Please correct the problem.

@ThanosKourouklis
Copy link

ThanosKourouklis commented Oct 18, 2021

Hello!
I have also to report that the zip file contain only 2 files, while at previοws days was containing 15 files and one subfolder.

@Deaxe
Copy link

Deaxe commented Oct 20, 2021

windows 11 will update or not?

@MrPatate87
Copy link

MrPatate87 commented Oct 21, 2021

I can't update my yogabook with mediacreationtool.
Try many time, on my existing system, fail
Reinstall my windows 10 and keep my file, fail
Reinstall windows 10 with a clean setup, fail.
Don't know how to make it and why it fail.....
IMG_20211021_225724
All work fine until this point
But at this moment i have this screen and all the process revert back and finally Come to my windows 10......
IMG_20211021_225808
If someone can help me ! Cause i try 4 times now with the same result....
Using mediacreationtool just fine here today (so must be the last version)

Work flowlessly on my other pc at the first try.....

@Elvi51
Copy link

Elvi51 commented Oct 25, 2021

Can I update my windows 11 build with this tool to the newest one? When I upgraded to Win11 I can't update my windows 11 build

@wqe3r4t5y6ui8o
Copy link

wqe3r4t5y6ui8o commented Nov 1, 2021

xd

@michelle1574
Copy link

michelle1574 commented Nov 9, 2021

@tigrottoneciao
Copy link

tigrottoneciao commented Nov 26, 2021

when I download the M dia Creation Tool.bat file I find only 2 files MediaCreationToolbat.md and Gitattribeates I would need the other 3 files. Where can I find them?

@AveYo
Copy link
Author

AveYo commented Nov 26, 2021

ever since I added 11 support, this gist barely worked, 9 out of 10 times the page did not even load
so I had to move the project to https://github.com/AveYo/MediaCreationTool.bat
this is already noted multiple times at top, why haven't you read that?

@Denissffd
Copy link

Denissffd commented Dec 26, 2021

fun fact if you bypass win 11 checks use win 11 upgrade assistant and go to compatibility option then windows 7 and there we go fresh upgrade without requirements i believe that help

@iGom
Copy link

iGom commented Dec 28, 2021

Thanks, upgraded 10 to 11 on motherboard with no TPM 2.0 and unsupported CPU i7-4790k!

@hzodeda
Copy link

hzodeda commented Jan 30, 2022

hello

@DoomerDGR8
Copy link

DoomerDGR8 commented Feb 6, 2022

Hi. I'm on Windows 11 21H2.22000.469. I have been stuck in this version for quite a while on my non-TPM system. Can I use this tool to fetch the latest Insider Dev here: https://www.microsoft.com/en-us/software-download/windowsinsiderpreviewiso ?

@gmy77
Copy link

gmy77 commented Feb 8, 2022

I don't know... i start the MCT and select Windows 11... then to write down on USB... all well, i select 11 in the list then writed on USB and i click to AUTO.BAT "inside created USB" , then i select my version WINDOWS 11 PRO... then i select to install from inside OS (Win10) but i read any time Windows Server and not Windows Pro... probably i wrong at any point? Or is just well this... now i have a blue screen :

WINDOWS SERVER INSTALATION
PC REBOOT MANY TIMES
COMPLETAMENT OPERATION 55%

CANCEL "BUTTON"

then i wait...

Anyway guys, this script... AWESOME !!! Very nice work.
Thanks.

@zhugexiaoshang
Copy link

zhugexiaoshang commented Mar 30, 2022

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment