Solution to prevent multiple Vision instances from running on one machine

Unfortunately I was not around to check the active sessions at the time. The script shouldn't care if a session exists on another computer, as it uses these 3 things to check for existing sessions:

  1. Username (common for all shop floor machines -- this is set up with autologin)
  2. Project name (common for all shop floor machines)
  3. PC name (unique for each shop floor PC)

In this way, it is meant to prevent multiple sessions on any given PC. I did find this post from 2010 which mentions ghost sessions being a real thing in Ignition:

It seems like this is what happened? Maybe there's a function I can incorporate that will attempt to kill a session without me needing to go into the gateway manually?