Hi Everyone.

I'm wondering if anyone has a better way to shutdown APCC from the Scheduler ShutdownObs.js script.

I currently use the standard script:

Console.PrintLine("Shutting down APCC");
if(!StopProcess("AstroPhysicsCommandCenter.exe"))
Console.PrintLine("**Failed to stop APCC");

However since I updated from APCC Pro 1.5.0.20 to APCC Pro 1.6.0.2, I have noticed that COM ports do not exit elegantly using this script. The virtual COM ports that were used become unavailable and the next time APCC opens it will use the next available COM ports. This does not have any negative affects on operation, but it does mean that eventually I have to restart the PC after a few days in order to reset all the COM ports that are occupied. This did not happen with the older version of APCC.

When quitting from APCC from the GUI with "exit" all is good. APCC releases the COM port and it will reopen with the same COM port the next time I open APCC.

I'm just curious to know if there is a different way to shutdown an app from the shutdown script that will exit the application elegantly like you were issuing an exit command from the GUI.

If there isn't a different way to exit the app I will get in touch with Astro-Physics.

Thanks
Sam