cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
jpriyank
Level 3

exit code of a vbscript as a custom action

hi !!! 🙂
Please can anybody tell me how can i use the exit code of a vbscript ran as a custom action.

Thanks
Labels (1)
0 Kudos
(2) Replies
RobertDickau
Flexera Alumni

There's not an easy way to get the exit code; common practice is to set a property in the VBScript action, using Session.Property("MYPROP")="myvalue", and then use the property value back in the main installer.
0 Kudos
cbragg
Level 7

Also to add to Robert's words of wisdom, usually you have the script run with on error resume next. Then at various points in your script you can read the err.number to see if an error occured. That way you can tailor the 'return code' dependant on the error in your session.property("PROPERTY")
0 Kudos