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?
thanks

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

import sys
print(sys.executable)

MaxScript using dotNet:

sys = dotNetClass "system"
print(sys.AppDomain.CurrentDomain.FriendlyName)

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