A new version of bat install script... but I don't tested now, only more later I can test this version in Windows XP. I think this script version work great.
Now, the script offers a choice to download or not the Ubuntu CD image. Comming soon a "default value system" to previne user don't enter a value in initial questions. If don't entered, a default value is used.
Sorry if this modification don't work.
Code:
@echo off
set /p DRIVAR=Which drive would you like to install Ubuntu to (If in doubt, type in "C:") ?
set /p BOOTVAR=Which drive would you like to install the bootloader to (If in doubt, type in "C:") ?
set /p ROOTSIZE=What size, in MB, do you want your root partition to be (If in doubt, type in "4000") ?
set /p HOMESIZE=What size, in MB, do you want your home partition to be (If in doubt, type in "4000") ?
set /p SWAPSIZE=What size, in MB, do you want your swap partition to be (If in doubt, type in "1000") ?
echo Moving files...
mkdir %DRIVAR%\ubuntu
move linux %DRIVAR%\ubuntu
move license.txt %DRIVAR%\ubuntu
move README.txt %DRIVAR%\ubuntu
move preseed.cfg %DRIVAR%\ubuntu
move initrd.gz %DRIVAR%\ubuntu
move menu.lst %DRIVAR%\
move grldr %BOOTVAR%\
move grub %BOOTVAR%\
echo Creating disk images...
qemu-img create -f raw root.img %ROOTSIZE%M
move root.img %DRIVAR%\ubuntu
qemu-img create -f raw home.img %HOMESIZE%M
move home.img %DRIVAR%\ubuntu
qemu-img create -f raw swap.img %SWAPSIZE%M
move swap.img %DRIVAR%\ubuntu
echo Making back-up of boot.ini and setting boot options...
attrib -s -h -r C:\boot.ini
copy C:\boot.ini C:\boot.bak
echo %BOOTVAR%\grldr="Ubuntu" >> C:\boot.ini
attrib +r +h +s C:\boot.ini
echo Press D to begin downloading the Ubuntu 7.04 alternate iso file. If you already have it, just press S to skip this step and place it in %DRIVAR%\ubuntu, then reboot.
echo.
CHOICE /N /C:DS Enter your choice (D or S): %1
IF ERRORLEVEL ==D GOTO DOWNLOAD
IF ERRORLEVEL ==S GOTO COMPLETE
:DOWNLOAD
wget http://cdimage.ubuntu.com/releases/feisty/herd-3/feisty-alternate-i386.iso
echo Download complete, moving Ubuntu image...
move feisty-alternate-i386.iso %DRIVAR%\ubuntu
GOTO COMPLETE
:COMPLETE
echo Congratulations! =)
echo Install complete, please reboot and select "Ubuntu".
GOTO END
:END
pause
Bookmarks