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!

Antarctica
Posts: 110
Joined: Tue Jul 08, 2014 9:24 am

Custom action no longer executed after child dialog added

I have a modified version of the SQL connection dialog.

The "Next" button has the following four Published Actions:
-> a connection string for ODBC connection is built:Set installer property value [SqlConnectionString] to Driver=[\{]SQL Server[\}];Server=[SQLSERVER];Uid=[SQLUSER];Pwd=[SQLPASS]
-> the Test ODBC connection action is executed (this action correctly throws an error whenever I try to login with wrong or empty username and password)
-> the following C# custom action is executed:

Code: Select all

        public static ActionResult ReplaceConnectionString(Session session)
        {
            if (session["SQLUSERTYPE"] == "Admin") {
                session["CONNSTRUSER"] = "myusername";
                session["CONNSTRPASS"] = "mypassword";
            } else {
                session["CONNSTRUSER"] = session["SQLUSER"];
                session["CONNSTRPASS"] = session["SQLPASS"];
            }
            return ActionResult.Success;
        }
-> The setup proceeds to the next dialog in sequence (VerifyReadyDlg).

Now, if my custom code had successfully been executed, [CONNSTRUSER] and [CONNSTRPASS] would contain something, right?
Either the fixed string, or the strings that were used for "Test ODBC Connection".
Because, during installation, the following should be added to the Web.config XML file:
user id=[CONNSTRUSER];password=[CONNSTRPASS];server=[SQLSERVER];database=[SQLDB];connection timeout=5

Until last week, all the four properties were correctly included in the connection string.
Then, I added a child dialog to the SQL connection dialog; which contains an RTF document with information how to correctly connect to SQL server.
Ever since, username and password are empty strings in Web.config.

So, it seems that the custom action is not executed, and my question is: Why?
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Custom action no longer executed after child dialog adde

Hi,

I'm not sure why those properties are not set. Can you 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?

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

Return to “Building Installers”