How to pass back a variable value as an exit code in Wisescript?
I am new to Wisescript, and have a seemingly simple problem: I want to execute a program and if the exit code is a certain number, pass back 0 instead, as if it was successful (this is the easy part). Otherwise, pass back the actual exit code (this is the hard part).
Well, the Exit command doesn't let you reference a variable; you must type in a number. So how can I take the value of PROCEXITCODE and pass it back?
[8|]
Well, the Exit command doesn't let you reference a variable; you must type in a number. So how can I take the value of PROCEXITCODE and pass it back?
[8|]
0 Comments
[ + ] Show comments
Answers (4)
Please log in to answer
Posted by:
mupdike
16 years ago
Hi all,
I am trying to accomplish this same task. I am currently trying to define WISE_ERROR_RTN with the %INSTALL_RESULT% values. When this is defined the only exit code I get is "1" (even if I manually define "0" in the exit block). Otherwise, if WISE_ERROR_RTN is not defined, I can set specific exit codes (numerically) in the exit block. What I am looking to avoid, of course, is trying to populate and define every possible exit code.
I am trying to accomplish this same task. I am currently trying to define WISE_ERROR_RTN with the %INSTALL_RESULT% values. When this is defined the only exit code I get is "1" (even if I manually define "0" in the exit block). Otherwise, if WISE_ERROR_RTN is not defined, I can set specific exit codes (numerically) in the exit block. What I am looking to avoid, of course, is trying to populate and define every possible exit code.
Posted by:
norexx
15 years ago
Posted by:
ditch_nz
15 years ago
Posted by:
bkruiser
15 years ago
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.