Sending a midi message to hardware on startup/shutdown

I’m wanting to see if I can set up Nuendo to send a midi message to my mixer on startup, and another to toggle it again on shutdown. Anybody know of a way to accomplish this? Thanks in advance!

Sysex messages on a midi track at start up and at the end of a track , i used to do this to setup all my midi gear , saving presets as sysex dumps and adding them to the start of each track . Depends on your mixer , just dump the settings into Nuendo (not to fast a tempo ) and add to a midi track with the mixer midi channel id

Thanks for the reply - and I have thought about doing it this way. However I was hoping for a more system-wide approach rather than a track-based one. It’s a toggle I need to have happen just once when I open Nuendo, and once when it shuts down. I don’t necessarily want it toggling every time I load a project, or having to put the message at the end of a track - especially because sometimes I don’t know where the “end” of the track will be.

There is a massive amount of loading/checking/etc. that happens when Nuendo loads - it would be ideal to be able to add a small script to do what I want during startup. I don’t really want to rely on loading a specific project in order to do this.