How do I upload sketch (and parameters) through a user interface I'm pretty new to Arduino and I'm developing my first real-world project. 

I have a Arduino Mega with a full working sketch in it which is going to be placed in several distant places and I have a number of "mantainers" that will need to get to the place, connect the board with their Windows (Vista+) laptop (USB), upload a new version of the sketch (if available), download some data from EEPROM and change (if needed) some parameters stored in PROGMEM. This just to give you the full picture, now I come to the questions.

What I'm trying to attempt is to write (in c++) a software that gives non-programmers a UI to do this stuff easily, so I wonder:


How do I load the .hex file to the board? I kinda got I have to use AVRdude: is there any c++ example/tutorial/library I can use not to reinvent the wheel?
When can I write to PROGMEM? When I connect with the serial cable Arduino stops the running sketch, waits for a new sketch and, if it does not arrive, it starts the old sketch back again. I guess that is the time to write to PROGMEM: if there is a running sketch I cannot do it, am I right?
1) Why not just

system("avrdude ...");


That's more or less what the Arduino IDE does.

2) If you really want to embed the data in the executable, see
Embedding Blobs in
Binaries.
You would need to re-link and re-upload the program each time you change
that data. You won't need the Arduino IDE, as it's only job is basically
to call avr-g++ and avrdude. You can use the IDE if you find it's CLI
easier than those of the standard tools.

If you put the data in EPPROM instead, the avrdude can upload it without
re-uploading the program.