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?

0 Comments   [ + ] Show Comments


Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.


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.
Answered 07/09/2008 by: mupdike
Senior Yellow Belt

Please log in to comment
Could you set a property in the MSI, then in the wisescript use the 'Set Windows Installer Property' to set that property to the value you want (the exit code)?
Answered 03/19/2009 by: ditch_nz
Purple Belt

Please log in to comment
I think this will get what you want....
in the vb script enter
SetVariable "INSTALL_RESULT", Err.Number
Answered 04/10/2009 by: bkruiser
Orange Belt

Please log in to comment
Answer this question or Comment on this question for clarity