Hi,
Please note that this is explained in the article to which the link points:
"
To return a value other than success from a script custom action, you must use a function target for the custom action. ... The following script example shows you how to return success or failure from a VBScript custom action."
Code: Select all
Function MyVBScriptCA()
If Session.Property("CustomErrorStatus") <> "0" Then
'return error
MyVBScriptCA = 3
Exit Function
End If
' return success
MyVBScriptCA = 1
Exit Function
End Function
Basically, you need to write a function in your custom action. This function will execute the code you want and it will be set to an integer value which means something:
0 -- Action not executed
1 -- Action completed successfully.
2 -- Premature termination by user.
3 -- Unrecoverable error. Returned if there is an error during parsing or execution of the Jscript or VBScript.
4 -- Suspended sequence to be resumed later.
5 -- Skip remaining actions. Not an error.
For the above example, the function
MyVBScriptCA is set to
3 in case of an error and to
1 in case of success.
Regards,
Cosmin
FOLLOW US
Get the latest news in Application Packaging