Created
December 27, 2017 11:44
-
-
Save ExtremeGTX/7de92d1c95a2e8e01c7b05aadabbfab9 to your computer and use it in GitHub Desktop.
Windows batch script for making a bootable USB Disk
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 | |
TITLE "Windows 7 USB installer by MOHAMED EL-SHAHAWI" | |
set _DVD=H: | |
:Menu | |
CLS | |
echo. | |
echo. Windows 7 USB installer | |
echo. | |
echo. | |
echo. ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ | |
echo. Installer Menu: | |
echo. ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ | |
echo. | |
echo. 1) Set Windows 7 DVD Directory [%_DVD%] | |
echo. | |
echo. 2) Set USB Disk Drive [%_USB%] | |
echo. | |
echo. 3) install | |
echo. | |
echo. 4) Exit | |
echo. | |
echo. ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ | |
set _ok= | |
set /p _ok= Enter your choice: | |
if "%_ok%" == "1" goto CFGDVD | |
if "%_ok%" == "2" goto CFGUSB | |
if "%_ok%" == "3" goto INSTALL | |
if "%_ok%" == "4" goto END | |
goto Menu | |
:CFGDVD | |
echo. | |
set /p _DVD= Enter Windows 7 DVD Location: | |
goto menu | |
:CFGUSB | |
echo. | |
set /p _USB= Select Target USB Disk: | |
goto menu | |
:INSTALL | |
CLS | |
echo. installing Windows 7 | |
echo. | |
echo. Source = [%_DVD%] | |
ECHO. USB Disk = [%_USB%] | |
echo. | |
echo. | |
echo. | |
echo. Installing Windows 7 | |
echo. | |
echo. | |
echo. | |
echo. Û²²²²²²²²²²²²²²² 5 % | |
echo. | |
pause | |
:FUSB | |
Cls | |
echo. installing Windows 7 | |
echo. | |
echo. Source = [%_DVD%] | |
ECHO. USB Disk = [%_USB%] | |
echo. | |
echo. | |
echo. Formating USB Disk [%_USB%] ....... | |
echo. !!Please Press Enter to Confirm!! | |
format /q /FS:NTFS /v:Windows7 %_USB% >nul | |
echo. | |
echo. | |
echo. | |
echo. | |
echo. ÛÛÛ²²²²²²²²²²² 15 % | |
echo. | |
pause | |
:WINCOPY | |
CLS | |
echo. installing Windows 7 | |
echo. | |
echo. Source = [%_DVD%] | |
ECHO. USB Disk = [%_USB%] | |
echo. | |
echo. | |
echo. Copy windows 7 files....... | |
xcopy /e "%_DVD%" "%_USB%" >nul | |
echo. | |
echo. | |
echo. | |
echo. | |
echo. ÛÛÛÛÛÛÛÛÛÛÛÛÛ² 90 % | |
echo. | |
pause | |
:WINBOOT | |
Cls | |
echo. installing Windows 7 | |
echo. | |
echo. Source = [%_DVD%] | |
ECHO. USB Disk = [%_USB%] | |
echo. | |
echo. | |
echo. Write windows bootsector....... | |
bootsect.exe /nt60 %_USB% | |
echo. | |
echo. | |
echo. | |
echo. | |
echo. ÛÛÛÛÛÛÛÛÛÛÛÛÛÛ 99 % | |
echo. | |
pause | |
:SETUPEND | |
Cls | |
echo. installing Windows 7 | |
echo. | |
echo. Source = [%_DVD%] | |
ECHO. USB Disk = [%_USB%] | |
echo. | |
echo. | |
echo. Windows Successfully installed | |
echo. Now Boot from USB to install Windows 7 | |
echo. Enjoy! | |
echo. | |
echo. | |
echo. ÛÛÛÛÛÛÛÛÛÛÛÛÛÛ 100 % | |
echo. | |
echo. by Mohamed El-Shahawi | |
echo. | |
echo. | |
set _SUS= | |
pause | |
:END | |
cls | |
Echo. | |
echo. | |
echo. ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ | |
echo. | |
echo. Thank you for using Windows 7 USB installer | |
echo. | |
echo. ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ | |
ECHO. | |
SET /p _STOP= | |
exit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment