The right click render option is essentially the command render.exe.
Let’s say your scene is called myscene.mb.
Open notepad and type in this :
render -r mr myscene.mb
and save it as renderthis.bat file in the folder that your scene file myscene.mb is in.
Double-click that renderthis.bat, the file that you’ve just created.
I’ll explain now what is happening. The right click option is simply running render.exe for your scene file. The default option is Maya Software. If you want mental ray, you will need to use the -r option, which is also -renderer, to specify which renderer you want to use.
If you actually go to the command line and type in render -h you will see a whole list of options that go with render.exe. and there’s also an option called -listrenderers that allows you to see the list of renderers that render.exe can use. To use mental ray, you need to put
"render -r mr " before you type in your scene file name.
And that’s all there is to it