Is it possible to launch Photoshop action using code? I mean launch the action in Photoshop via a batch file? Or something like that?
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.