/build/static/layout/Breadcrumb_cap_w.png

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|]

0 Comments   [ + ] Show comments

Answers (4)

Posted by: mupdike 16 years ago
Senior Yellow Belt
0
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.
Posted by: ditch_nz 15 years ago
Purple Belt
0
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)?
Posted by: bkruiser 15 years ago
Orange Belt
0
I think this will get what you want....
in the vb script enter
SetVariable "INSTALL_RESULT", Err.Number
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ