Last active
June 24, 2021 20:01
-
-
Save zurgeg/cb4d1d3cb0b07305a39e796310a03e34 to your computer and use it in GitHub Desktop.
Windows NT Manual Install Script (Compatible With Windows Vista>=)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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