Indigo Rose Software
  #1  
Old 10-03-2003
Desmond's Avatar
Desmond Desmond is offline
Indigo Rose Staff Member
 
Join Date: Jul 2003
Posts: 628
Grin KB: Determining if a Network (LAN) is Present

AutoPlay Media Studio 5.0 Knowledge Base

Determining if a Network (LAN) is Present

Document ID: IR10071
The information in this article applies to:
  • AutoPlay Media Studio 5.0 Professional Edition

SUMMARY

This article describes how to determine if a network connection is present on the user's computer.

DISCUSSION

In AutoPlay Media Studio 5.0, to determine if a user is connected to a LAN, insert the following code into any event in your application:

lan = System.GetLANInfo();

lan_exist = true;

for j in lan do

if lan[j] == "Unknown" then

lan_exist = false;

end

end



if lan_exist then

Dialog.Message("", "You are connected to a LAN");

else

Dialog.Message("", "You are not connected to a LAN");

end

Please note that this example works in Windows 98 First Edition, Windows 98 Second Edition, Windows 2000, and Windows XP. Windows 95 and Windows NT do not fit this model. To detect a LAN connection in all operating systems, first detect the user's OS, and the launch an appropriate detection script.

MORE INFORMATION

For more information please see the following topics in the AutoPlay Media Studio 5.0 help file:

  • Program Reference | Actions | System | System.GetLANInfo

KEYWORDS: AutoPlay Media Studio 5.0, System, Network, LAN, Detect


Last reviewed: October 3, 2003
Copyright © 2003 Indigo Rose Corporation. All rights reserved.
:confused:
__________________
Setup Factory 8.0 comes with over 250 actions so you can create smaller, faster and more intelligent software installers than ever before.

WebHelp Guides: AMS | MSIFACT | SUF | TU | VP
  #2  
Old 08-07-2004
SUF6NEWBIE
Guest
 
Posts: n/a
I would like to add to Desmonds script to cover more (not connected)

lan = System.GetLANInfo();
lan_exist = true;
for j in lan do
if (lan[j] == "Unknown") or (lan[j] == "127.0.0.1") then
lan_exist = false;
end
end

if lan_exist then
Dialog.Message("", "You are connected to a LAN");
else
Dialog.Message("", "You are not connected to a LAN");
end

NOTE: 127.0.0.1 is often returned instead of "Unknown"
above is a common return value for networks using
MSHOME as network type and currnetly not connected
 

Thread Tools
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 On



All times are GMT -6. The time now is 11:58 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Copyright © 2000 - 2009 Indigo Rose Corporation. All rights reserved.
Indigo Rose Software