Hi Bob,
Did you ever get on to a solution to Stephane's problem?
I'm actually having the same problem with my StartUp script. The shutter opening part is basically the same as Stephane's. When I call to open the shutter (line 191 and again line 213), I get the message "Unexpected shutter status 4." It's exactly the same problem - the dome is an an error state right at the top "try."
Earlier I had connected the telescope correctly (line 88), but the dome did not open there either, and whatever happened possibly put the dome in the error state I found later.
I use the ASCOM Astrohaven driver from 2011, and it is regsvr32'd. I must not have something set right with the dome driver, obviously. I have not used the Pipe tool to see what's happening.
Whatever the answer to Stephane's problem is/was would be instructive, or "help?"
Thanks.
I've attached the whole startup javascript, and a log file.