Skip to content
⌘ NSIS Forum Archive

Checking for connectivity in NSIS

4 posts

smokeofc#

Checking for connectivity in NSIS

Hello.

I'm trying to create a costom page in NSIS where the user can type an IP/Host-adress and check for connectivity by pressing a button. I can't seem to figure how to ping using this setup... so I'd like to ask for some assistance 🙂
jpderuiter#
Are you a developer who uses NSIS to distribute your application? Are you a Winamp plug-in developer who wants to use NSIS to distribute your plug-in? Have suggestions for other people like you? This is the place.
LoRd_MuldeR#
Calling "ping.exe" as an external program and the parsing its output (or checking the exit code) seems a bit inconvenient and error-prone.

Why not simply use the InternetCheckConnection() function instead?


System::Call "wininet::InternetCheckConnection(t 'http://www.example.com/', i {FLAG_ICC_FORCE_CONNECTION}, i 0) i .r0"
Anders#
Originally Posted by LoRd_MuldeR View Post

... i {FLAG_ICC_FORCE_CONNECTION}, i 0) i .r0"
Should be ${FLAG_ICC_FORCE_CONNECTION}