Command line for Avrdude, burn bootloader and upload prog using avrisp MkII

REM Call avrdude with the relevant parameters to burn the ATMEGA328P-PU Bootloader to the chip

REM paste all of this into a .bat file and run it.
REM The fuse settings work.
"C:\Program Files\arduino-1.6.5-r5\hardware\tools\avr\bin\avrdude" "-CC:\Program Files\arduino-1.6.5-r5/hardware/tools/avr/etc/avrdude.conf" -v -patmega328p -cstk500v2 -Pusb "-Uflash:w:C:\Program Files\arduino-1.6.5-r5\hardware\arduino\avr/bootloaders/optiboot/optiboot_atmega328.hex:i" -Ulock:w:0x0F:m -U lfuse:w:0xff:m -U hfuse:w:0xde:m -U efuse:w:0x05:m

@echo Bootloader successfully burnt. Please input the COM Port to use (e.g. 2):
@set /p ArduinoCOMPort= COM

REM Call avrdude to upload an HEX file to the ATMEGA chip using the bootloader we previously burned
REM To change the flashed file, simply modify the -Uflash parameter:
REM -Uflash:w:FILE.hex:i
"C:\Program Files\arduino-1.6.5-r5\hardware\tools\avr\bin\avrdude" "-CC:\Program Files\arduino-1.6.5-r5/hardware/tools/avr/etc/avrdude.conf" -v -patmega328p -carduino -PCOM%ArduinoCOMPort% -b115200 -D -Uflash:w:MyProg.hex:i
@echo Success.
@pause

Care to elaborate?