Uria
Posts: 21
Joined: Tue Mar 03, 2009 8:47 am

Script Error

Hi,

I'm trying to use the following VB script in an inline script custom action:

Code: Select all

If Session.FeatureRequestState("Feature_Server") = 3 Then Session.Property("F_SERVER") = "1"
I get this error when running the installation:
There is a problem with this Windows Installer package. A script required for this install to complete could not be run. Contact your support personnel or package vendor.
I also tried Javascript syntax.

What I'm trying to do is set 3 parameters, one for each selected feature. Something like:

Code: Select all

if (Session.FeatureRequestState("Feature_Server") == msiInstallStateLocal)  Session.Property("F_SERVER") = "1";
if (Session.FeatureRequestState("Feature_Distribution") == msiInstallStateLocal)  Session.Property("F_DISTRIBUTION") = "1";
if (Session.FeatureRequestState("Feature_EmailGateway") == msiInstallStateLocal)  Session.Property("F_EMAIL_GATEWAY") = "1";
Also, how do I put all of it in a single line? should I use ";" or ":" to separate lines?

Thanks
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Script Error

Hi,

I tested this code in a custom action and it works as expected. Can you please send us the AIP with the problem and a verbose log of the install to support at advancedinstaller dot com so we can investigate them?
Also, how do I put all of it in a single line? should I use ";" or ":" to separate lines?
You can use ":" to separate lines. For example:

Code: Select all

if Session.FeatureRequestState("Feature_Server") = msiInstallStateLocal Then  Session.Property("F_SERVER") = "1" : if Session.FeatureRequestState("Feature_Distribution") = msiInstallStateLocal Then Session.Property("F_DISTRIBUTION") = "1" : if Session.FeatureRequestState("Feature_EmailGateway") = msiInstallStateLocal Then Session.Property("F_EMAIL_GATEWAY") = "1"
Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”