Newer versions of Photoshop (CS5 and CS6 are the only ones I've worked with) support a feature called Droplets
that lets you create executables to run a set of actions.
Check here for detailed information on creating and running the droplet. Will update this answer with the steps shortly.