How is the exe program supposed to be called?
If the serial communication is part of a larger program, why not use it to send the codes.
Sorry if this is off base, but a little more info in what you are rying to accomplish might lead to better solutions than a standalone exe.