ales.hrodek
Posts: 64
Joined: Mon Jun 11, 2012 11:40 am

Test Internet Connection

Hi,

My installer is Server/Client setup. In Launch Conditions is set "Run only if an active Internet connection is found" because some prerequisites needs to be downloaded (SQL Server, .Net, VC++ etc.). Unfortunately some customers does not have connection on their end users machines. I can include client's prereq into installer but do not want add big ones which are required by server. Can I just test internet connection (do not stop installer to run) and store result in property? Then I can allow to install only client application without error messages and server installation option will be unavailable.
Eusebiu
Posts: 4931
Joined: Wed Nov 14, 2012 2:04 pm

Re: Test Internet Connection

Hi,

In order to achieve what you want you can follow the steps below:
- go in the "Launch Conditions" page and check the "Run only if an active Internet connection is found" option
- go in the "Table Editor" page, "LaunchConditions" table, right-click and "Delete" the row: AI_INTERNET_CONNECTION = "AI_INET_CON_SUCCESS"
- go in the "Dialogs" page and select the "Server" button from the "ClientServerDlg" dialog
- in the "Control Condition" tab add the following condition:
  • Condition: AI_INTERNET_CONNECTION <> "AI_INET_CON_SUCCESS"
    Action: Disable
- build and run the project

Let us know if this helped, otherwise give us more details about your scenario.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
ales.hrodek
Posts: 64
Joined: Mon Jun 11, 2012 11:40 am

Re: Test Internet Connection

Thank you - it works as I want.
Eusebiu
Posts: 4931
Joined: Wed Nov 14, 2012 2:04 pm

Re: Test Internet Connection

You're welcome. I'm glad it works.

Just let us know anytime you need help.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
ales.hrodek
Posts: 64
Joined: Mon Jun 11, 2012 11:40 am

Re: Test Internet Connection

Hi,

This solution came back to me from testers. Issue is internet connection check takes too long (2 mins.) User see only welcome screen for that time. It is AI 9.9 behaviour. I decided to install latest AI 11.4.1 trial on VPC to test if there is any improvement. In latest version it takes same time showing dialog "Evaluating launch conditions" but what's more it then throw message "Application require as active Internet connection...." even condition is deleted in Table Editor.
Eusebiu
Posts: 4931
Joined: Wed Nov 14, 2012 2:04 pm

Re: Test Internet Connection

Hi,

I tested the scenario again, but I couldn't reproduce the behavior. Can you please send me a sample AIP file that I can build and try to reproduce the problem? Also, can you please tell me which machine did you encounter the problem on?

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
ales.hrodek
Posts: 64
Joined: Mon Jun 11, 2012 11:40 am

Re: Test Internet Connection

I have not reproduced problem I had with 11.4.1 again. Probably I did something wrong.

I have narrowed down issue with slow internet connection check. If connection is available then everything is fine but without connection it takes 2 seconds on my Win7 machine and also on Win7 VPC. Same installer tested on XP VPC (does not have non-VPC XP to test it) it takes much longer time.

Sample project attached.
Attachments
test.aip
(17.85 KiB) Downloaded 430 times
Eusebiu
Posts: 4931
Joined: Wed Nov 14, 2012 2:04 pm

Re: Test Internet Connection

Hi,

I tested the sample AIP that you attached on a Win XP SP2 VPC and a Win XP SP3 VPC with and without internet connection, but I couldn't reproduce the behavior.

However, I noticed that you checked the "Check predefined launch conditions before searching for prerequisites" option in the "Prerequisites" page, but in this case the launch conditions will be evaluated by the bootstrapper, before the MSI package is launched and the modification that you made in the "Table Editor" page will be ignored. So, the scenario you mentioned in your first post can be implemented only if that option is unchecked.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
ales.hrodek
Posts: 64
Joined: Mon Jun 11, 2012 11:40 am

Re: Test Internet Connection

Yes - I've just found that issue is not version of AI but combination of "Check predefined launch conditions before searching for prerequisites" and presence of any pre-install prerequisite. I used it to prevent installing Windows Installer 4.5 in pre-install stage and then after reboot get message about OS not supported. I can sort it by unticking not supported OS (service packs) also from prerequisite conditions.

Evaluation speed issue is then probably related with my/testers VPC environment. Bad news for me is I must be sure it's fast on other systems before releasing to customers.

Thank you for your time.
Eusebiu
Posts: 4931
Joined: Wed Nov 14, 2012 2:04 pm

Re: Test Internet Connection

You're welcome. Glad to help.

Just let us know anytime you need help.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
ales.hrodek
Posts: 64
Joined: Mon Jun 11, 2012 11:40 am

Re: Test Internet Connection

Hi,

I have narrowed down speed issue conditions. I used fresh XP image from here: https://www.modern.ie/en-us/virtualizat ... #downloads

If you do not have network connection then everything is smooth but with network but no internet (firewall) is check time consuming process.
Eusebiu
Posts: 4931
Joined: Wed Nov 14, 2012 2:04 pm

Re: Test Internet Connection

Hi Ales,

I downloaded the "IE8-XP" virtual machine for "VMware Player" from the link that you mentioned, installed it, disabled the internet connection from Control Panel and tested again the project that you sent, but I still could not reproduce the problem. Is there any other configuration that I should make?

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
ales.hrodek
Posts: 64
Joined: Mon Jun 11, 2012 11:40 am

Re: Test Internet Connection

Hi Eusibiu,

I am using Virtual PC for Windows 7 but it should not be cause. How did you disabled Internet connection?

My test:
- First I set everything to be able access internet. In that case is check very fast.
- In Control Panel - Network Connections: Disable network adapter. Still it is fast.
- Now Enable adapter back and in Properties - TCP/IP - Advanced: add Default gateway 1.1.1.1
- Check you cannot get to internet (invalid gateway) but can get to local network. Now run installer and there is a delay.

I hope you will get same result now as everybody in our company because I have no more ideas what is cause.
ales.hrodek
Posts: 64
Joined: Mon Jun 11, 2012 11:40 am

Re: Test Internet Connection

Here is part of verbose log:

1) Local network access: Network adapter Enabled - Invalid Gateway

MSI (c) (18:78) [08:35:35:434]: Doing action: AI_Internet
Action 8:35:35: AI_Internet.
Action start 8:35:35: AI_Internet.
MSI (c) (18:B8) [08:35:35:434]: Invoking remote custom action. DLL: C:\DOCUME~1\IEUser\LOCALS~1\Temp\MSI8E.tmp, Entrypoint: ActiveInternetConnection
MSI (c) (18!D4) [08:37:38:461]: PROPERTY CHANGE: Modifying AI_INTERNET_CONNECTION property. Its current value is 'AI_INET_CON_SUCCESS'. Its new value: 'AI_INET_CON_FAILED'.
Action ended 8:37:38: AI_Internet. Return value 1.

2) No network: Network adapter Disabled

MSI (c) (7C:10) [08:45:06:115]: Doing action: AI_Internet
Action 8:45:06: AI_Internet.
Action start 8:45:06: AI_Internet.
MSI (c) (7C:80) [08:45:06:125]: Invoking remote custom action. DLL: C:\DOCUME~1\IEUser\LOCALS~1\Temp\MSI96.tmp, Entrypoint: ActiveInternetConnection
MSI (c) (7C!C4) [08:45:06:195]: PROPERTY CHANGE: Modifying AI_INTERNET_CONNECTION property. Its current value is 'AI_INET_CON_SUCCESS'. Its new value: 'AI_INET_CON_FAILED'.
Action ended 8:45:06: AI_Internet. Return value 1.
Eusebiu
Posts: 4931
Joined: Wed Nov 14, 2012 2:04 pm

Re: Test Internet Connection

Hi Ales,
- In Control Panel - Network Connections: Disable network adapter. Still it is fast.
This is the way I disabled the internet connection, too.

After I followed the steps you mentioned, the time the internet connection was checked increased indeed, but not more than 15 seconds. We will investigate this and see if we can improve it in a future version of Advanced Installer. Thank you for bringing it to our attention.

Meanwhile, you can display a message to the users that the internet connection is verified and it can take up to 2 minutes. To achieve this, you can go in the "Table Editor" page, "ActionText" table and add a new row as in the example below:
  • Action: AI_Internet
    Description: PLEASE WAIT while the internet connection is verified. This may take up to 2 minutes.
The above text will be displayed on the "PrepareDlg" dialog. I modified and attached your AIP file, so you can test it.

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

Return to “Building Installers”