Programming hex file from command line in windows

I'm trying to program my brand new uno from the command line without much success in Windows 8. The arduino IDE programming works fine.

The command I have tried (and many variations thereof) is:

avrdude -p atmega328p -P \\.\com5 -carduino -b 57600 -D -U flash:w:main.hex

It's definately com5. I've also tried 19200 baud and other target programmers and processors as I find in google searches but they all do the same thing which is cause the L LED to blink a few times, the Rx light blinks a couple of times and then it goes back to running the old sketch that was already programmed into it (blinky).

The error I get from avrdude each time is

avrdude: stk500_getsync(): not in sync: resp=0x00

Anyone know how to do this? I've been googling and experimenting for a couple of hours now and don't feel like I'm getting any closer.

Got it to work with -b 115200