Old 20th November 2007, 04:14   #1
fal135
Junior Member
 
Join Date: Nov 2007
Posts: 3
Post Connect to internet

I am using following script to connect to internet but it doesn't work.. Can any one help me out in this ?

My script is as follows:

Function ConnectInternet

Push $R0

ClearErrors
Dialer::AttemptConnect
IfErrors noie3
Dumpstate::debug
Pop $R0
StrCmp $R0 "online" connected
MessageBox MB_OK|MB_ICONSTOP "Cannot connect to the internet."
Quit ;This will quit the installer. You might want to add your own error handling.

noie3:

; IE3 not installed
MessageBox MB_OK|MB_ICONINFORMATION "Please connect to the internet now."

connected:
MessageBox MB_OK|MB_ICONINFORMATION "Connected to internet."

Pop $R0

FunctionEnd


Thanks,
fal135 is offline   Reply With Quote
Old 20th November 2007, 07:45   #2
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
You are missing a Goto after the noie3. Use LogicLib instead.
code:

!include LogicLib.nsh
...
ClearErrors
Dialer::AttemptConnect
Pop $R0
${If} ${Errors}
${OrIf} $R0 != online
MessageBox MB_OK|MB_ICONSTOP "Cannot connect to the internet."
Abort
${EndIf}


Stu
Afrow UK is offline   Reply With Quote
Old 20th November 2007, 08:01   #3
fal135
Junior Member
 
Join Date: Nov 2007
Posts: 3
Unhappy Connect to internet

here Dialer:AttempConnect always return online at my place if local area network is connected or not.
fal135 is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump