Windows 설치 USB 만들기 - autoexec.bat

autoexec.bat 설명

  • autoexec.bat

메모장를 이용해 아래의 내용을 복사한 뒤 다른이름(autoexec.bat)으로 저장

1 바탕화면 우클릭 → 새로만들기 → 텍스트문서

2 하단의 내용 복사해서 붙여 넣기

3 autoexec.bat 로 저장

@echo off
PROMPT $P$G

set path=%path%;\;\mdir;

if not exist bootmgr goto NOBMGR
if exist bootmgr goto BMGR

:NOBMGR
if not exist 8186mgr goto ERROR
if not exist 8164mgr goto ERROR
if not exist 1086mgr goto ERROR
if not exist 1064mgr goto ERROR
goto %config%

:BMGR
attrib -h boot
attrib -h sources
attrib -h bootmgr
attrib -h efi
attrib -h bootmgr.efi
if not exist 8186mgr goto 8186
if not exist 8164mgr goto 8164
if not exist 1086mgr goto 1086
if not exist 1064mgr goto 1064
goto BHE

:8186
if not exist 8164mgr goto BHE
if not exist 1086mgr goto BHE
if not exist 1064mgr goto BHE
ren boot 8186boot
ren sources 8186sour
ren bootmgr 8186mgr
ren efi 8186efi
ren bootmgr.efi 8186mgr.efi
attrib +h 8186boot
attrib +h 8186sour
attrib +h 8186mgr
attrib +h 8186efi
attrib +h 8186mgr.efi
goto %config%

:8164
if not exist 1086mgr goto BHE
if not exist 1064mgr goto BHE
ren boot 8164boot
ren sources 8164sour
ren bootmgr 8164mgr
ren efi 8164efi
ren bootmgr.efi 8164mgr.efi
attrib +h 8164boot
attrib +h 8164sour
attrib +h 8164mgr
attrib +h 8164efi
attrib +h 8164mgr.efi
goto %config%

:1086
if not exist 1064mgr goto BHE
ren boot 1086boot
ren sources 1086sour
ren bootmgr 1086mgr
ren efi 1086efi
ren bootmgr.efi 1086mgr.efi
attrib +h 1086boot
attrib +h 1086sour
attrib +h 1086mgr
attrib +h 1086efi
attrib +h 1086mgr.efi
goto %config%

:1064
ren boot 1064boot
ren sources 1064sour
ren bootmgr 1064mgr
ren efi 1064efi
ren bootmgr.efi 1064mgr.efi
attrib +h 1064boot
attrib +h 1064sour
attrib +h 1064mgr
attrib +h 1064efi
attrib +h 1064mgr.efi
goto %config%

:BHE
attrib +h boot
attrib +h sources
attrib +h bootmgr
attrib +h efi
attrib +h bootmgr.efi
goto ERROR

:ERROR
if exist bootmgr echo exist Unidentified windows install files
if not exist 8186mgr echo not exist windows 8.1 x86 install files
if not exist 8164mgr echo not exist windows 8.1 x64 install files
if not exist 1086mgr echo not exist windows 10 x86 install files
if not exist 1064mgr echo not exist windows 10 x64 install files
if %config%==8186inst goto quit
if %config%==8164inst goto quit
if %config%==1086inst goto quit
if %config%==1064inst goto quit
goto %config%

:8186inst
attrib -h 8186boot
attrib -h 8186sour
attrib -h 8186mgr
attrib -h 8186efi
attrib -h 8186mgr.efi
ren 8186boot boot
ren 8186sour sources
ren 8186mgr bootmgr
ren 8186efi efi
ren 8186mgr.efi bootmgr.efi
goto BHRG

:8164inst
attrib -h 8164boot
attrib -h 8164sour
attrib -h 8164mgr
attrib -h 8164efi
attrib -h 8164mgr.efi
ren 8164boot boot
ren 8164sour sources
ren 8164mgr bootmgr
ren 8164efi efi
ren 8164mgr.efi bootmgr.efi
goto BHRG

:1086inst
attrib -h 1086boot
attrib -h 1086sour
attrib -h 1086mgr
attrib -h 1086efi
attrib -h 1086mgr.efi
ren 1086boot boot
ren 1086sour sources
ren 1086mgr bootmgr
ren 1086efi efi
ren 1086mgr.efi bootmgr.efi
goto BHRG

:1064inst
attrib -h 1064boot
attrib -h 1064sour
attrib -h 1064mgr
attrib -h 1064efi
attrib -h 1064mgr.efi
ren 1064boot boot
ren 1064sour sources
ren 1064mgr bootmgr
ren 1064efi efi
ren 1064mgr.efi bootmgr.efi
goto BHRG

:BHRG
attrib +h boot
attrib +h sources
attrib +h bootmgr
attrib +h efi
attrib +h bootmgr.efi
grub4dos.exe
goto quit

:dos
ver
goto quit

:quit
Share on Google Plus

About 2651911

This is a short description in the author block about the author. You edit it by entering text in the "Biographical Info" field in the user admin panel.
    Blogger Comment
    Facebook Comment

0 개의 댓글 :

댓글 쓰기