A while back a forum member (old forums) devatechnologies, posted some code to automate logging on to NinjaTrader.exe.
I think it worked only once or twice on my system so, I moved on.
Some time became available and I looked into the failure to reliably log on and found a couple of reasons.
Based on devatechnologies’ example I created a new program that reliably logs on for me. I posted it to GitHub (GitHub - EverestSoftwareLLC/NJLogon: Ninja-Trader-Logon).
The source code and a compiled and signed exe are included.