1. on windows 7 <Enviroment Variables>, and in the <System Variables> section; add your maya bin folder path to the <path>.
i.e C:\Program Files\Autodesk\Maya2012\bin;
2. add MI_MAYA_SOCKETS=1; <--- this line to your <maya.env> "C:\Users\YOURNAME\Documents\maya",
and you may need to add it inside the <maya.env> in the path "C:\Users\YOURNAME\Documents\maya\2012-x64" too.
note1: you have to render one test-render first -using render view- "NOT BATCH RENDER" ..
note2: <file name prefix> must be added and frame animation ext. must be like this: <name.#.ext> (3rd one). then you go..
copy and past <batchItWatchIt.mel> to your script folder..
1. open maya and then your scene.
2. render settings > file name prefix name your outpot file ..
3. set frame/animation ext. to <name.#.ext>
3. test it using render view (this is a must for only once atleast )
note: this script for mentalray rendering..
if you have any problem, just reply me..