Skip to content

Guide · Open source

How to use MediaCreationTool.bat: install media and upgrade guide

Updated · written with AI from the project's own documentation and checked against our catalogue data

MediaCreationTool.bat is an open-source Windows batch script that drives Microsoft's Media Creation Tool and adds preset options for building Windows 10 or 11 install media (USB or ISO) and for in-place upgrades. This guide is for Windows users and IT staff who want a specific edition, language or architecture, or who want to understand what the script changes. By the end you will know how to get the script, which preset fits your goal, and what the script writes to the media.

MediaCreationTool.batAveYo/MediaCreationTool.bat · ★ 10.3k · MIT

Quick start

  1. 1Clone the repository. Run git clone https://github.com/AveYo/MediaCreationTool.bat in a folder you choose.
  2. 2Pick a preset. Decide between Auto Upgrade, Auto ISO, Auto USB, Select or MCT Defaults based on whether you are upgrading a PC or building media.
  3. 3Set options in the script name. Rename the script to add an edition, language, architecture, version or def flag as the README describes.
  4. 4Run the script. Start the script from Windows. It asks for administrator rights itself.
  5. 5Choose the target. For Auto USB, select the USB drive manually in the GUI, as the README requires for data safety.
  6. 6Check the output. Review the media or ISO the script writes, including auto.cmd and any $ISO$ content.

What MediaCreationTool.bat is and what it changes

The script wraps Microsoft's Media Creation Tool. Its README describes it as a universal wrapper for Windows 10 and 11 versions from 1507 to 21H2, with support for business editions and deployment automation.

Because it wraps the official tool and changes its setup behaviour, it is not an officially supported Microsoft process. The README says the presets modify the media they create, so the output is not an untouched Microsoft download unless you choose the MCT Defaults preset.

  • Works on Windows 10 or 11 only, since the script is a Windows batch file.
  • Licence is MIT.
  • Language is Batchfile.

Install MediaCreationTool.bat by cloning the repository

The project's install method is clone-and-build. The README gives this command to clone the repository:

  • Run the clone command in a folder where you want the script to live.
  • Run the script from that folder. The README says you do not need to right-click and choose Run as Admin, because the script asks for elevation itself.
  • If you saved the raw file directly instead of cloning, the changelog notes that line endings no longer break.
git clone https://github.com/AveYo/MediaCreationTool.bat

Choose the right preset

The script offers five presets. Pick the one that matches your goal. The README lists them as follows.

  • 1. Auto Upgrade: uses the detected media and helps set up an upgrade directly. It can keep files and apps in more scenarios where the OS and target edition do not match. It defaults to Windows 11, so pass the version for Windows 10.
  • 2. Auto ISO: creates an ISO using the detected media in the current folder, or C:\ESD if run from a zip. You can override the detected media by adding edition, language or architecture to the script name.
  • 3. Auto USB: uses the detected media and a USB target you specify. For data safety, you must select the USB drive manually in the GUI. It is not fully automated.
  • 4. Select: you pick the edition, language and architecture (x86, x64 or both) and the target. It includes setup override files unless you add def to the script name.
  • 5. MCT Defaults: runs unassisted and creates media without modifying the script output. The script passes products.xml to MCT and quits without touching the media.

Understand what presets 1 to 4 write to the media

Presets 1 to 4 modify the media they create. According to the README, they can write the following items. The README says you can disable these changes by adding def to the script name to get a default, untouched MCT media.

  • auto.cmd, to run an auto upgrade on demand with edition switch and TPM skip.
  • The $ISO$ folder content, if it exists, at the root of the media. If you previously used $OEM$ content, place it in $ISO$\sources\$OEM$\.
  • sources\PID.txt, to preselect the edition at media boot or within Windows.
  • sources\EI.cfg, to prevent the product key prompt on Windows 11 consumer media.
  • AutoUnattend.xml in boot.wim, to enable a local account on Windows 11 Home.
  • A patched winsetup.dll in boot.wim, to remove Windows 11 setup checks when booting from the media.

Run an unattended upgrade by renaming the script

The README says the Auto Upgrade preset is behind auto.cmd, and that you can run it fully unattended by renaming the script. The generated script is added to the media so you can run it again later.

The script detects editions in install.esd, picks a suitable index, and sets EditionID in the registry to match. It can also force another edition while keeping files and apps. The README says the original EditionID is backed up as EditionID_undo.

  • Rename the script to auto MediaCreationTool.bat for a fully unattended run.
  • Add an edition name to the script name to switch edition, for example ProfessionalWorkstation MediaCreationTool.bat.
  • Pass a version for Windows 10, for example auto 21H2 MediaCreationTool.bat.
  • Add a version and edition together, for example auto 21H2 Pro MediaCreationTool.bat, to upgrade several PCs to one edition.
  • Add a VL, MAK or retail product key in the same way to handle licensing differences.
auto 21H2 MediaCreationTool.bat

Troubleshoot an upgrade that fails

The README says you can troubleshoot a failing upgrade by adding no_update to the script name. It also says that if you had no success launching the script before, the latest version should work. Those statements are from the README; this guide cannot confirm outcomes on your hardware.

  • Try the no_update option in the script name if an upgrade fails.
  • If the Media Creation Tool itself will not launch, the README suggests trying this version of the script.
  • Use MCT Defaults if you need unmodified Microsoft media.

What people use it for

  • Building a Windows 11 USB for a specific edition and language.
  • Upgrading PCs where the installed edition differs from the media edition, using Auto Upgrade.
  • Creating an ISO for a Windows 10 build by passing a version in the script name.
  • Making unmodified Microsoft media with the MCT Defaults preset.
  • Running an unattended upgrade across several PCs with auto.cmd.

Frequently asked questions

Is MediaCreationTool.bat free to use?

The project is licensed under MIT, as stated on its repository page. The README does not describe any paid tier.

How do I install MediaCreationTool.bat?

The install method is clone-and-build. Run git clone https://github.com/AveYo/MediaCreationTool.bat, then run the script on Windows 10 or 11.

Does MediaCreationTool.bat skip the Windows 11 TPM check?

The README says the script will try to skip Windows 11 setup checks, including the TPM check, and that this can be disabled with a script variable. It also says the boot.wim patch removes setup checks when booting from the media.

Can I use MediaCreationTool.bat to upgrade without losing files?

The README says Auto Upgrade tries to keep files and apps in more scenarios where the OS and target edition do not match. It cannot guarantee this for every PC, so back up important data first.

Why is USB creation not fully automatic?

The README says that for data safety, the Auto USB preset requires you to select the USB drive manually in the GUI.

What are the alternatives to MediaCreationTool.bat?

Comparable projects listed for this item are Rufus, Ventoy and the official Microsoft Media Creation Tool. Use the official tool if you need a Microsoft-supported process.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

MediaCreationTool.bat suits Windows users and IT staff who need install media for a specific edition, language or architecture, or who want to upgrade PCs whose edition differs from the media. It is a poor choice if you need an officially supported Microsoft process or do not want the media modified or Windows 11 checks bypassed; in those cases use the official Media Creation Tool, or Rufus or Ventoy for USB builds.

Install options & downloads