I use the Arduino as ISP with Avrdude at command level with same parameters for both the bootloader or the sketch with bootloader.
This is the Batch file:
@ECHO Usage: Boot[comm port] [file] [ENTER]
@if "%1"=="" goto NO_COMM
@ECHO Set fuses
@.\avr\avrdude -C.\avr\avrdude.conf -v -patmega1284p -cstk500v1 -PCOM%1 -b19200 -e -Ulock:w:0x3F:m -Uefuse:w:0xFD:m -Uhfuse:w:0xDE:m -Ulfuse:w:0xF7:m
@ECHO Burn bootloader
@if "%2"=="" goto ALTFILE
@.\avr\avrdude -C.\avr\avrdude.conf -v -patmega1284p -cstk500v1 -PCOM%1 -b19200 -Uflash:w:.\avr\optiboot_atmega1284p.hex:i -Ulock:w:0x0F:m
:ALTFILE
@.\avr\avrdude -C.\avr\avrdude.conf -v -patmega1284p -cstk500v1 -PCOM%1 -b19200 -Uflash:w:.\hex\%2.hex:i -Ulock:w:0x0F:m
@if errorlevel 1 goto ERROR
@goto DONE
EXIT
:NO_COMM
@ECHO Comm port missing!
GOTO DONE
:ERROR
@ECHO Something went wrong - Nothing done!
@echo Error level: %errorlevel%
:DONE
The command line uses one or the other based on the presence of the second parameter (the sketch file).
C:setuP\boot 3 -> Burns the bootloader (optiboot_atmega1284p.hex)
c:>setup\boot 3 blink -> Burns the bootloader and the sketch
As you may see the fuses are set in both cases the same and it works fine as far as I can tell but I'm not an expert in this so it may be that I'm lucky.