Skip to content

Instantly share code, notes, and snippets.

@zurgeg
Last active June 24, 2021 20:01
Show Gist options
  • Save zurgeg/cb4d1d3cb0b07305a39e796310a03e34 to your computer and use it in GitHub Desktop.
Save zurgeg/cb4d1d3cb0b07305a39e796310a03e34 to your computer and use it in GitHub Desktop.
Windows NT Manual Install Script (Compatible With Windows Vista>=)
@echo off
echo Usage:
echo nt_manual_install.bat <path_to_install.wim> <path_to_install_dir> <system_partition>
echo By default, it installs Windows Home
echo To override this, you can set NTMANINSTALLINDEX to the index in the WIM image
echo For more info, you can run "dism /Get-WimInfo /WimFile:%1"
REM Set NTMANINSTALLINDEX if it isn't already set.
If Not Defined NTMANINSTALLINDEX (
set NTMANINSTALLINDEX=1
)
REM Apply image
dism /Apply-Image /Index:%NTMANINSTALLINDEX% /Image:%1 /ApplyDir:%2
echo Applied image.
REM BCDBoot installs system files
bcdboot %2 /s %3 /f ALL
echo Installed system files.
echo Rebooting in 3 seconds...
echo Press any key to reboot immediatly
timeout /t 3
wpeutil reboot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment