RobsonShelterit
Posts: 14
Joined: Thu Oct 10, 2013 2:18 pm

Doubts organization.

Hello!

One more doubt many. : D

'm Finding difuldade in a process at the facility in Organization have three installation features, where one must be installed in accordance with the condition "TXT_DESK = YES" as shown in image below. When I perform the installation, not the expected behavior occurs. TXT_DESK may vary from YES to NO, when OWNED is YES, it usually installs the feature, and when the condition is equal to NO, it should ignore the feature installation.

The problem that occurs is that the option is qnd to YES, it does not install anything. I've tried several ways, but all attempts were invalid.

How to proceed in this case, I'm doing the correct procedure?

I'm waiting for a return!
Regards, Robson.
Attachments
organization.PNG
organization.PNG (42.46 KiB) Viewed 4577 times
RobsonShelterit
Posts: 14
Joined: Thu Oct 10, 2013 2:18 pm

Re: Doubts organization.

I'm trying to use the following script!

Function Teste()
Dim iRequestState
iRequestState = Session.FeatureRequestState("EASAPLICACAO")
Session.Property("TXT_UM") = iRequestState
End Function


But the return is not expected. Am I doing something wrong?

See the error shown in the attached image.
Attachments
erroAdvanced.png
erroAdvanced.png (6.6 KiB) Viewed 4571 times
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Doubts organization.

Hello Robson,

If you want to install a feature based on user selection during Wizard Dialog Stage then you can use a similar approach like it is described in our "Show a custom feature selection dialog" how to.
Function Teste()
Dim iRequestState
iRequestState = Session.FeatureRequestState("EASAPLICACAO")
Session.Property("TXT_UM") = iRequestState
End Function

But the return is not expected. Am I doing something wrong?
Please take a look on our "I can not use Session.FeatureRequestState in inlinescript" thread which could be useful for you.

If you still encounter problems implementing your scenario please send us the .AIP (project file) and a verbose log of the installation to support at advancedinstaller dot com so we can investigate them? Also, please give us a more details about what you are trying to achieve.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
RobsonShelterit
Posts: 14
Joined: Thu Oct 10, 2013 2:18 pm

Re: Doubts organization.

Hello !

Trying to explain my situation.
I have a customization dialog where it hesitate three installation options of my tool :

Application option
Script option
Prerequisite option

PREREQUISITE : is SQL Server Express 2008 R2 ;
SCRIPT : is a SQL script that will be executed ;
APPLICATION : is my application itself , dll 's and executable system .

I need it to behave as follows:

- When I did not request the installation SCRIPT , my PREREQUISITE should not be installed .
- When selected the SCRIPT one TestODBCConnection will be done to check if the instance is specific to my application already existing or not ( SQLConnectionOK ) . If the instance exists, the prerequisite should not be installed if the instance does not exist, the prerequisite must be installed .

I am creating these options for the customer to create the database on a server if it needs it, and applying it to another location . Or if you prefer to install it all ( local) .

How to proceed in this case?

I've tried a solution in all forums Advanced internal , but without success .

Thank you in advance for help!

Robson Sisnande .
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Doubts organization.

Hello Robson,

In order to implement this scenario you can proceed like this:
- go to "Dialogs" page and on your customization dialog add three check box controls like this:
  • Text: Prerequisite
    Value: checked
    Property Name: PREQ

    Text: SQL Script
    Value: checked
    Property Name: SCRIPT

    Text: Application
    Value: checked
    Property Name: APP
- go to "Prerequisites" page and add the SQL Server package as a feature-based prerequisite
- go to "Organization" page, select the feature of the added prerequisite and from the "Feature Properties" right pane enable the "Install based on condition" option with the following condition:

Code: Select all

PREQ
- select the feature of your application and from the "Feature Properties" right pane enable the "Install based on condition" option with the following condition:

Code: Select all

APP
- go to "SQL Scripts" page and add the following condition for your SQL Connection:

Code: Select all

SCRIPT
- go to "Custom Actions" page and add a "Test ODBC Connection" custom action without sequence
- go to "Dialogs" page and on your customization dialog select the SCRIPT checkbox and add the following published events:
  • Control Event: Set installer property value
    Property: [SqlConnectionString]
    Argument: Driver=[\{]SQL Server[\}];Server=[SERVER_PROP];Port=[PORT_PROP];Uid=[USERNAME_PROP];Pwd=[PASSWORD_PROP];
    Condition: SCRIPT

    Control Event: Execute custom action
    Argument: TestODBCConnection
    Condition: NOT (SqlConnectionString = "") AND SCRIPT

    Control Event: Set installer property value
    Property: [PREQ]
    Argument: {}
    Condition: (SqlConnectionOK = "1" AND SCRIPT) OR (NOT SCRIPT)

    Control Event: Set installer property value
    Property: [PREQ]
    Argument: checked
    Condition: SqlConnectionOK <> "1" AND SCRIPT
- build and run your project

Let us know if this helped.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”