Firstly, you'll need:
Then, following the instructions in the screenshots ahead:
Title: Name
Command: ...\avrdude.exe
Arguments: -C"...\avrdude.conf" -v -patmega2560 -cwiring -PCOM4 -b115200 -D -Uflash:w:"$(ProjectDir)Debug\$(TargetName).hex":i
[WARN]: ... refers to the installation path of WinAVR's avrdude.exe.
[WARN]: check port in Device Manager, it won't always be COM4.
[WARN]: Use Output window means AVRDude will not open a CMD instance.
You now own a happy little flashed ATmega2560!












Great work! Please check how this solution behaves in a computer without Arduino IDE, to see if any additional USB drivers are needed. If so, can you include these additional steps?