Unable to change Vray GI settings using maxscript from command line


We have created a pre-render Max script that will allow us to change multiple vray settings and max settings.

We are getting different results when running this script via max command line as compared to running the script through GUI.

The major problem is with the VRAY GI settings. When max gui is open and we run the prerender script the script changes the IR and LC paths as provided in the script and the script runs flawlessly. We are also able to change the render element output paths etc..

But if we run the same script through max command line it doesnt have any effect on the GI settings. Although the other desired functions like changing render element paths, Frame buffer settings work fine. Its just the GI settings that is anomaly. Can someone help us on this.Thanks