Archive: Check for Dialup connection and Broadband


Check for Dialup connection and Broadband
Is there a function/plugin out there that checks for Diaup [I am using Dialer] and a Broadband connection ?

If the user is not connected to the Internet by either method, I wanted to quit the installer.

Is this possible without using Nsisdl::download ?

many thanks


The Dialer plug-in is what you're looking for.


Doesn't the 'dialer' plugin only check for a dialup connection. I tried to use it with and without my broadband connection to no avail. With no connection, I still get 'online' for the getconnectionstate....


That might be because the connection to the broadband modem is always online. To be 100% sure you'll need to download something or ping some server.


Ok, what would be the way to ping a server ?
has anyone written a function ...and is it using nsisdl...or some other method ?

many thanks
g


If you don't mind depending on Internet Explorer 3.0, you can call InternetCheckConnection using System.dll.


does it need to Launch Explorer ? Or, does the user simply need to have it installed. That is a fairly old version. As long as I do not have to launch Explorer, sounds like a good solution


It doesn't launch it, it just needs it installed.


Can you direct me to an example of this ? Looking now on the internet and looking at the System plugin readme....
Also, does this mean if they have a later version of Explorer, that it will fail ? Or, they have to have at least Explorer 3.0
many thanks


!define FLAG_ICC_FORCE_CONNECTION 0x00000001
System::Call "wininet::InternetCheckConnection( \
t 'http://www.google.com/', \
i ${FLAG_ICC_FORCE_CONNECTION}, i 0) i .r0"
StrCmp $0 "error" noie3
StrCmp $0 "0" noconnection
Internet Explorer 3.0 is the minimum, it will work with newer versions too.

great :) Is there any docs on this ?
thanks for your help...
under FLAG_ICC_FORCE_CONNECTION and nsis under google I was not able to find anything

g


InternetCheckConnection and FLAG_ICC_FORCE_CONNECTION are documented in MSDN. System.dll is documented in Contrib\System\System.html.