We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

njshaw2
Posts: 26
Joined: Fri Apr 19, 2013 10:36 am

Return error state from VBScript

Hi,

If I add a custom action to run a VBScript file, what return value should I be returning to trigger the "Fail installation if custom action returns an error"? I can't find it documented anywhere. I would assume returning False should do it?

Also, if I return nothing (i.e. the script has no functions, it's just a list of commands to execute) the installer is treating it as a failure. Should I always write a function that the installer can call?
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Return error state from VBScript

Hi,
If I add a custom action to run a VBScript file, what return value should I be returning to trigger the "Fail installation if custom action returns an error"? I can't find it documented anywhere. I would assume returning False should do it?
You can return the value "3". You can find the return values of a VBScript custom action in the Return Values of JScript and VBScript Custom Actions article.
Also, if I return nothing (i.e. the script has no functions, it's just a list of commands to execute) the installer is treating it as a failure. Should I always write a function that the installer can call?
I'm not sure why you encounter this behavior. It is not necessary to write a function in the VBScript file if you do not want it.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
njshaw2
Posts: 26
Joined: Fri Apr 19, 2013 10:36 am

Re: Return error state from VBScript

Thanks, that's great.

Turns out the failure of my script was due to an error in the script itself, not that the installer was mishandling the response.
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Return error state from VBScript

You're welcome. Glad to help.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”