@echo off pushd %~dp0 bcdedit > nul if errorlevel 1 goto _admin :_input cls echo. echo. echo. echo µî·ÏÇÒ VHD ÆÄÀÏÀÇ °æ·Î¸¦ ÀÔ·ÂÇØÁÖ¼¼¿ä. echo. echo ´Ü °æ·Î¿¡ ¶ç¾î¾²±â°¡ Æ÷ÇÔµÈ °æ¿ì echo. echo Å« µû¿ÈÇ¥´Â »ý·«ÇØÁֽñ⠹ٶø´Ï´Ù. echo. echo. echo ÁÁÀº ¿¹ : D:\vhd files\win7.vhd echo. echo ³ª»Û ¿¹ : "D:\vhd files\win7.vhd" echo. echo. echo. set /p src=°æ·Î¸¦ ÀÔ·ÂÇØÁÖ¼¼¿ä : cls echo. echo. echo. echo µî·ÏÇÒ VHD ÆÄÀÏÀÇ ºÎÆÃ ¸Þ´º À̸§À» Áö¾îÁÖ¼¼¿ä. echo. echo. echo. set /p name=À̸§À» ÀÔ·ÂÇØÁÖ¼¼¿ä : :_confirm cls echo. echo. echo. echo µî·ÏÇÒ VHD ÆÄÀÏÀÇ °æ·Î : %src% echo. echo µî·ÏÇÒ VHD ÆÄÀÏÀÇ ¸Þ´º : %name% echo. echo. echo. set /p right=À§ ³»¿ëÀÌ ¸ÂÀ¸¸é Y¸¦, Ʋ¸®¸é NÀ» ÀÔ·ÂÇØÁÖ¼¼¿ä : if /i "%right%" == "y" goto _next if /i "%right%" == "n" goto _input goto _confirm :_next for /f "tokens=1 delims=\" %%a in ('echo %src%') do set path1=%%a for /f "tokens=2 delims=:" %%b in ('echo %src%') do set path2=%%b set file=[%path1%]%path2% bcdedit /create /application OSLOADER /d "%name%" > guid.txt for /f "tokens=1 usebackq" %%c in (guid.txt) do ( bcdedit /set %%c device vhd="%file%" if errorlevel 1 goto _eng bcdedit /set %%c osdevice vhd="%file%" bcdedit /set %%c path \Windows\system32\winload.exe bcdedit /set %%c locale ko-KR bcdedit /set %%c inherit {bootloadersettings} bcdedit /set %%c systemroot \Windows bcdedit /set %%c nx OptIn bcdedit /set %%c detecthal Yes bcdedit /displayorder %%c /addlast bcdedit /timeout 5 del guid.txt goto _success ) :_eng for /f "tokens=3 usebackq" %%d in (guid.txt) do ( bcdedit /set %%d device vhd="%file%" bcdedit /set %%d osdevice vhd="%file%" bcdedit /set %%d path \Windows\system32\winload.exe bcdedit /set %%d locale ko-KR bcdedit /set %%d inherit {bootloadersettings} bcdedit /set %%d systemroot \Windows bcdedit /set %%d nx OptIn bcdedit /set %%d detecthal Yes bcdedit /displayorder %%d /addlast bcdedit /timeout 5 del guid.txt ) :_success cls echo. echo. echo. echo ÀÛ¾÷ÀÌ ¿Ï·áµÇ¾ú½À´Ï´Ù. ÀÌÁ¦ ÀçºÎÆÃ ÇØº¸½Ã¸é echo. echo "%name%" ¸Þ´º°¡ ³ªÅ¸³¯ °ÍÀÔ´Ï´Ù. echo. echo. echo. pause exit :_admin cls echo. echo. echo. echo ¿ìŬ¸¯ ÇØ¼­ °ü¸®ÀÚ ±ÇÇÑÀ¸·Î ½ÇÇàÇØÁÖ¼¼¿ä. echo. echo. echo. pause exit