check internet connection
Hello.
I have a question regarding checking internet connection.
I am trying to detect if there is an internet connection with the folowing code:
------------------------------------
Function ConnectInternet
Push $R0
ClearErrors
Dialer::AttemptConnect
IfErrors noie3
Pop $R0
StrCmp $R0 "online" connected
MessageBox MB_OK|MB_ICONSTOP "Cannot connect to the internet."
Quit
noie3:
; IE3 not installed
MessageBox MB_OK|MB_ICONINFORMATION "Please connect to the internet now."
connected:
MessageBox MB_OK " connection to internet was verified."
Pop $R0
FunctionEnd
-----------------------
The problem is : I want to detect if
the function works corectly and I unplug the network
cable. Then I run the installer, but the function still detects that the internet connection is on, and I get the message box with "connection to internet was verified"
How do I solve this?
Thanks.