Sequence not running pre-event or post-sequence scripts

I have created two batch files to change the profile on my Dahua observatory camera from Day to Night profile, such that I may disable IR lights before a sequence runs, and re-eable them after the sequence completes.

I have configured the switch to Night profile (no IR) to run prior to an event, which is set up to take a bias frame. The switch to Day profile then runs upon sequence completion.

I have tested the batch files thoroughly, they perform as expected. Yet, when I run the sequence, while the log says it is running the scripts, there is no indication they have run, and the profile does not change on the camera. Indeed, for the post-event script, the log even indicates “End of sequence script ran successfully”, though it did not.

Link to Logs

Useful Info

OS: Microsoft Windows 10 Home
Ver: 4.0.0.643
.NET: 4.8
ASCOM: 6.5.1.3174

SOLVED

Problem was that apparently, despite starting in the program’s directory, SGP attempts to execute the .exe within the batch from its own app directory…and of course it can’t find it there.

However, being a batch, it runs, exits, and there you go. With no way to check a return value, SGP presumes the “script ran correctly”.

So : In batch file, include full path to whatever executable or script you’re running.

Ah…the good olde “Working directory”.

Glad you figured out what was going on.

Jared