Arduino Firmware Uploader without IDE on Windows
If you are using Arduino IDE, you could find tutorial here.
I suggest to use platformio, which is very simple and easy. After compiling your project, you will find firmware.hex in the .pioenvs\PLATFORM\
This bat file uses ArduinoSketchUploader 3.2 by Christophe Diericx
The usage are
-f, --file Required. Path to the input file (in intel HEX format) which
is to be uploaded to the Arduino.
-p, --port Name of the COM port where the Arduino is attached (e.g.
'COM1', 'COM2', 'COM3'...).
-m, --model Required. Arduino model. Valid parameters are any of the
following: [Leonardo, Mega1284, Mega2560, Micro, NanoR2,
NanoR3, UnoR3].
--help Display this help screen.
A sample command line invocation (for a Mega2560 type Arduino attached to COM4):
ArduinoSketchUploader.exe --file=C:\MyHexFiles\myHexFile.hex --port=COM4 --model=Mega2560
If only a single COM port is in use on the system (used by the attached Arduino), one can omit the port:
ArduinoSketchUploader.exe --file=C:\MyHexFiles\myHexFile.hex --model=UnoR3