Bogdan
4th March 2002, 14:17
Hi,
How can I retrieve the errorlevel number returned by a win(client) command excuted with app_start()? If possible.
Thank you
mark_h
4th March 2002, 15:42
I think you can use app_status to see if the app started.
rc = app_status(app_id)
if(rc = 0) then
message("Application start failed.")
endif
Good Luck!
Mark
Bogdan
4th March 2002, 23:56
Hi mark_h,
Yes, I tried to use this (from yours excelent import script) but it's not so good because this way I can only check if the application start and not the errorlevel return number. For example if I'll start excel with a command line argument file name, the excel will start even if the file is found or not, so for BaaN everything seems to be ok, but it's not. This mean that no matter what application I start from BaaN, as long as it's not returning a failure error code, for BaaN it's ok. But sometimes this is not enough.
Why all this: I tried to identify the IP address of the user who launch a session, and the best way I find to do it in Win was :
ipconfig [/C] | find /I "ad.dr.es.s" The point is this command is returning nothing or a string (or a number if used /C). But is allways returning something so it runs so it's ok for BaaN.
Writing this reply I had another ideea: is it possible to import in BaaN the return value of an external command?
Thank you for your help.