Old 28th June 2007, 14:22   #1
FingerThief
Junior Member
 
Join Date: Jun 2007
Posts: 2
How to check if the PC is inet connected ?

Afternoon ...

Being reading NSIS documentation, google search results and stuff for over an hour now ... but I can't find an answer to above question.

I simply need a function ( to show after the MUI_PAGE_WELCOME ) that checks if the computer is connected to the internet.

If not I need to MB_OK|MB_ICONSTOP out of the installation without further notice.

This is due to some files and settings being obtained during installation over the internet via SOAP and NSISdl.

If somebody could help me out there it would be much appreciated !

TIA

FT
FingerThief is offline   Reply With Quote
Old 28th June 2007, 14:29   #2
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
Simply do a test call to your SOAP service. This should cover all checks. If it works, the computer is connected to the internet, your website is accessible and the SOAP service is functional.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 28th June 2007, 14:43   #3
FingerThief
Junior Member
 
Join Date: Jun 2007
Posts: 2
Quote:
Originally posted by kichik
Simply do a test call to your SOAP service.
That is what I want to avoid ... I just want to verify if the PC is connected to the internet before I start the mumbo jumbo about downloading files/SOAP etc.( and constructing a fake SOAP call ain't something I would wanna do ).

No simple way ?

FT
FingerThief is offline   Reply With Quote
Old 28th June 2007, 14:54   #4
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
You can use Dialer::GetConnectedState or Dialer::AttemptConnect but that's never as good as making an actual call. Every heuristic has some false positives. Some, like checking for an active interface, have more than others.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 28th June 2007, 15:01   #5
Takhir
Major Dude
 
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,222
forum and wiki search give me nothing now, but I remember few threads with InternetGetConnectedState samples. Try search later.
Takhir is offline   Reply With Quote
Old 28th June 2007, 15:02   #6
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
Dialer::GetConnectedState calls InternetGetConnectedState.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 28th June 2007, 15:32   #7
Joel
Debian user
(Forum King)
 
Joel's Avatar
 
Join Date: Jan 2003
Location: Arch land
Posts: 4,917
I think using Wininet::InternetConnect would more secure to detect currently and active internet connection...
In my past experiences, Wininet::InternetAttemptConnect is not always accurate :\


* PC: Intel Core 2 DUO E6550 @ 2.33 GHz with 2 GB RAM: Archlinux-i686 with MATE.
* Laptop: Intel Core 2 DUO T6600 @ 2.20 GHz with 4 GB RAM: Archlinux-x86-64 with MATE.
Joel is offline   Reply With Quote
Old 28th June 2007, 18:00   #8
Red Wine
Forum King
 
Red Wine's Avatar
 
Join Date: Mar 2006
Location: Ath. GR
Posts: 2,078
Here is a recent discussion of the subject, Takhir's way

http://forums.winamp.com/showthread....hreadid=262554

Quick AVI Creator - Quick and easy convert from DVD/MPEG/AVI/MKV to AVI/MP4/MKV
Quick AVI Creator entirely edited with NSIS and entirely upgraded to Unicode NSIS
Red Wine 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