Hello everyone,
do anyone of you know which value autopilot.exe returns when
- it works fine or
- when there was an error
I need this information in a Navision CU to decide, if the code should continue.
Thanks for every help,
Anja
6 comments
-
Jet Reports Historic Posts Official comment Hmm, well AutoPilot doesn't return anything I don't think so you may be out of luck on that front. You could make your script check the log file although that's kind of a pain (especially since you don't necessarily know what the error message will look like). You could make your script check for the presence of the output file or something else like that as well.
Regards,
Hughes -
Jet Reports Historic Posts Hi Anja,
I'm not sure exactly what you mean. If you're talking about AutoPilot.exe itself (as in using it at the command line) it doesn't return anything. You can use the /L argument and specify a log file and errors will be logged to that log file. Does that help?
Regards,
Hughes -
Jet Reports Historic Posts Hello Hughes,
I'm calling it from a Windows Scripting Host Variable Type WshShell in Navision, and WshShell returns an integer.
Another function which is called after autopilot.exe must Not execute when autopilot fails, so the log file doesn't help me. -
Jet Reports Historic Posts Do you know if the output file allways does not exist when autopilot fails?
-
Jet Reports Historic Posts Well that depends on what you mean by "AutoPilot fails". You could have AutoPilot set to run a report and then send an email. If the report runs fine, but the email fails to send then the report is still going to exist in the output folder. Alternately, your data source could be configured incorrectly, your license could expire, etc. and then AutoPilot might run the report, but the report could have all #VALUEs on it. In this case the report failed, but AutoPilot itself isn't going to report any errors because from its perspective, it ran the report and did what it was supposed to. It just depends on what you are having AutoPilot do and what you mean by failure.
The other thing is that the output file may still exist from the previous AutoPilot run unless your script deletes or moves the file between runs, so you would need to do that as well.
Regards,
Hughes -
Jet Reports Historic Posts Thanks for your Answer.
I now check if the output file exists.
If and how I capture the other error source, I cannot decide alone. But now I have an idea what other failures can happen.