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,
Connect to internet
3 posts
You are missing a Goto after the noie3. Use LogicLib instead.
Stu
!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}
Connect to internet
here Dialer:AttempConnect always return online at my place if local area network is connected or not.
here Dialer:AttempConnect always return online at my place if local area network is connected or not.