Page 1 of 1
"Run program as" return values
Posted: Tue Nov 20, 2012 7:00 am
by alibaba
Hi,
I get strange return values from "Run program as" function. Where can I find the complete return codes list?
I execute an other installation with "Run program as" but the return value is not from this installation, so I think it is related to the function itself.
Thank you!
Re: "Run program as" return values
Posted: Tue Nov 20, 2012 8:07 am
by FrancescoT
Dear Albaba,
The value returned by Run Program it is not handled or modified in any way by the command itself.
The command returns exactly the value returned by the called application (if any) with just one exception, it returns -1 if the program cannot be started.
Regards
Re: "Run program as" return values
Posted: Tue Nov 20, 2012 8:21 am
by bokkie
Alibaba,
The way I approach it is to run the command independently of the installer and get it working that way. That is, open a DOS command prompt and run the command in it and then display the DOS error code afterwards. There are many reasons for a command to fail such as does the path variable point to the folder where the executable is; do the double and/or single quotes (if any) balance; are you using a pathname that contains spaces which might need to be quoted? That sort of thing.
Generally, if I get the command running in a DOS window then that usually solves the command syntax. Once copied to the Run Program As statement it invariably works.
Re: "Run program as" return values
Posted: Tue Nov 20, 2012 8:33 am
by alibaba
Thank you two for your answers. My problem is that I run another installation (After Aplly Install) and the return value is sometimes unexpected. That is why I thought that the return values may be from the "run program as function".
Anyway I will try bokkies's approach to verify if I get the same values.
Re: "Run program as" return values
Posted: Tue Nov 20, 2012 10:17 am
by FrancescoT
Dear Albaba,
with the other installation (After Aplly Install) you could use "Terminate with Exit Code" command to return any value as you prefer.
Regards