Hi,
I think I have an idea of what you are trying to achieve. Since MAX can detect or list NI devices that you have connected up to your computer with the help from driver software you should be able to interigate your computer from application level software to find out what chassis and modules you might have connected up. Essentially there is a way to programatically identify which module or device you might have connected up using the DAQmx API. The property in LabVIEW help file DAQmx API is called Identification: "Product Category Property", short name: ProductCategory. Products are identified with unique numbers.
You can use this to then programatically determine whether a particular task should be executed. See VI attached.
I hope this helps!
Kind Regards,
Kirtesh Mistry
Applications Engineer
National Instruments UK & Ireland.