From the Start Menu select All Programs, Altera, Nios II EDS, and then Nios II Command Shell
sof2flash --input=yourfile_hw.sof --output=yourfile_hw.flash
--offset=0x640000 --pfl --optionbit=0x18000 --programmingmode=PS
elf2flash --base=0x08000000 --end=0x0BFFFFFF --reset=0x0A020000
--input=yourfile_sw.elf --output=yourfile_sw.flash
--boot=$SOPC_KIT_NIOS2/components/altera_nios2/boot_loader_cfi.srec