Internet connection status - Advanced Installer Community
Qureshi
Posts: 8
Joined: Tue Mar 31, 2015 2:05 pm

Internet connection status

Is there any way to check/read status of internet connection (connnected or not connected) using VB script ?
please let me know

Thanks
Qureshi
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Internet connection status

Hi Qureshi,

You can enable the predefined Run only if an active Internet connection is found option from the Launch Condition page.

Please let me know if that helped otherwise give me more details about your specific scenario.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Qureshi
Posts: 8
Joined: Tue Mar 31, 2015 2:05 pm

Re: Internet connection status

Thanks but then in this case application will run only if there is an internet connection always this is not what i want.

I want to perform some custom action (self defined) and i want to run my custom action only in case if there is an internet connection. So wandering is there any way to check the status of internet connection ? one possibility to ping some website and read the status. BUT May be there is a direct way in Avanced installer to check this connection, just wandering ?
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Internet connection status

Hi Qureshi,

Yes, you can find the ActiveInternetConnection function from the aicustact.dll that checks if an internet connection is available on the target machine.

The result is set in the AI_INTERNET_CONNECTION property. If an active internet connection is found, the AI_INTERNET_CONNECTION property have the following value:

Code: Select all

AI_INET_CON_SUCCESS
If there is no internet connection, the AI_INTERNET_CONNECTION property have the following value:

Code: Select all

AI_INET_CON_FAILED
In order to call the ActiveInternetConnection function from the aicustact.dll you can use the predefined Call function from attached native DLL custom action. Please see the attached image for your reference:
ActiveInternetConnectionFunction.png
ActiveInternetConnectionFunction.png (39.92 KiB) Viewed 2577 times
Should there be any difficulty you encounter implementing something, please do not hesitate to contact me and I will gladly assist.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”