I use
Project options -> Build Actions
and enter a command into the Pre-build command line. This can be a batch file invocation. I have a utility that increments a build number declaration in a version file that is then re-compiled on every build.
This is the same on the MSP-430, ARM and Atmel AVR-32 versions of the IAR toolset.