Exception in download installer

Add-in Express™ Support Service
That's what is more important than anything else

Exception in download installer
Imrove error message 
Dirk




Posts: 73
Joined: 2017-10-05
Hello
we have an Excel Add-In which is downloaded by the executable that the adxpublisher created.
If the downloader does not find the specific version in the version_info.xml an ugly message box is shown with a confusion error message. "The 'files section of 'version_info.xml' has nor files. Source Url <our url> Task name: Download File.
How can we customize the error message to "The version you are looking for is not available any more. Please go to our download page and download the latest version".
We only store the latest version in our version_info.xml which is always created new for each deployment.
I think if the download page is not available a similar confusing message appears. Better would be: "The download page is currently not available. Please try again later"

best regards.
Posted 14 Mar, 2019 12:21:33 Top
Andrei Smolin


Add-in Express team


Posts: 18821
Joined: 2006-05-11
Hello Dirk,

You can customize all such messages using a ClickTwice module.


Andrei Smolin
Add-in Express Team Leader
Posted 15 Mar, 2019 05:24:16 Top
Dirk




Posts: 73
Joined: 2017-10-05
Ok. Thanks. I will read the documentation. But one question.
We do use adxpublisher to create AddIn on our build server. Is it possible to customize the labels without visual studio on our build server? We create the MSI setup using WIX toolset.
Posted 18 Mar, 2019 05:40:59 Top
Andrei Smolin


Add-in Express team


Posts: 18821
Joined: 2006-05-11
Hello Dirk,

Labels? Sorry?

You should use a ClickTwice module to customize this error message(s).


Andrei Smolin
Add-in Express Team Leader
Posted 18 Mar, 2019 06:23:46 Top
Dirk




Posts: 73
Joined: 2017-10-05
"Labels" means the text that is shown in the dialog box. In our example: "The 'files section of 'version_info.xml' has nor files. Source Url <our url> Task name: Download File."
And if we use ClickTwice module to customize the error message, we can build the downloader executable including the new texts in our build system?
Posted 18 Mar, 2019 07:11:53 Top
Andrei Smolin


Add-in Express team


Posts: 18821
Joined: 2006-05-11
Hello Dirk,

Yes, the ClickTwice module is intended to let you communicate with the ClickTwice utilities in order to control and customize all the areas possible.


Andrei Smolin
Add-in Express Team Leader
Posted 19 Mar, 2019 04:20:04 Top
Dirk




Posts: 73
Joined: 2017-10-05
ok. Can you support us with an example to customize the following:
1) customer error message if version_info.xml does not contain the expected version.
2) customer error message if the server we are downloading from is not available.

Best regards
Dirk
Posted 20 Mar, 2019 08:40:53 Top
Andrei Smolin


Add-in Express team


Posts: 18821
Joined: 2006-05-11
Hello Dirk,

#1.

        private void adxRibbonButton1_OnClick(object sender, IRibbonControl control, bool pressed)
        {
            if (IsMSINetworkDeployed())
            {
                string updateUrl = CheckForMSIUpdates();
                if (!String.IsNullOrEmpty(updateUrl))
                {
                    if (MessageBox.Show("There is a new update available for download.
Would you like to install it?") == DialogResult.OK)
                        LaunchMSIUpdates(updateUrl, null, null, false, ADXMsiInstallerUILevels.Full);
                }
                else
                {
                    MessageBox.Show("No new updates available.");
                }
            }
            else
            {
                MessageBox.Show("The add-in is not network deployed.");
            }
        }


#2. Internally, CheckForMSIUpdates() uses WebClient.DownloadData(String); see https://docs.microsoft.com/en-us/dotnet/api/system.net.webclient.downloaddata?view=netframework-4.7.2#System_Net_WebClient_DownloadData_System_String_. Wrap the CheckForMSIUpdates() call in a try/catch to handle the exception from the WebClient.DownloadData(String) method.


Andrei Smolin
Add-in Express Team Leader
Posted 20 Mar, 2019 09:37:58 Top
Dirk




Posts: 73
Joined: 2017-10-05
Ok. Thanks. But I meant something different. The problem is in the downloader.exe. This shows the error message:
The 'files section of 'version_info.xml' has no files. Source Url <our url> Task name: Download File.

Inside the AddIn we have no problem to show the correct messages and handle errors. The downloader is generated by the adxpublisher if I understand correctly and used adxpublisher.exe.config entries.
Posted 20 Mar, 2019 10:05:51 Top
Andrei Smolin


Add-in Express team


Posts: 18821
Joined: 2006-05-11
Hello Dirk,

It looks like you removed the old version from version_infor.xml and use the old-version downloader to install a new version. You should use the new-version downloader to do this.


Andrei Smolin
Add-in Express Team Leader
Posted 22 Mar, 2019 07:00:05 Top