3dsmax batch mode

I have a maxscript execute when max is started, I would like to not run this script running 3dsmaxbatch.exe
how can I know if I’m in batch mode from maxscript?

You could probably test the executable name to see if it is maxbatch.exe.

import sys

MaxScript using dotNet:

sys = dotNetClass "system"

These are educated guesses and not tested as I am on my phone, but the general idea should work even if my implementation is borked.

oh I didn’t think on this, good idea thanks