This depends on you ir software. If you have an imon solution in your case you can achieve this in the imon manager but you will have to use a existing command you'll reprogram. If your ir receiver is compatible with a ir software like lirc you could also use this software.
If not your only way to do it is with a bat/exe file.
I always mod my htpc's with an imon receiver as this gives me the most freedom to assign / reprogram ir commands/macros.
The first part you want to do is easy ir command wise in MC itself (options-remote) by taking an existing mce command and reprogram it with an macro or assigning the bat/exe to it. But once mc is closed of course it can no longuer handle any commands and close the external program aynd relaunch itself, that's when you need other ir software to handle your command as described at the beginning.