Jump to content

How To? Check for Internet Connection


Recommended Posts

I read the latest WPI has the ability to check for an internet connection.

I would like to implement this into all the installs that download things such as updates (Spybot for example)

How do I go about creating a greyed condition for if there is no internet connection.

I can't seem to find many/any tutorials on conditions for applications.

Further, Can you add a condition to a registry add?

Such as "Registry After" is dependent on if the program it is intended for was installed.

How can I do both these things?

Link to comment
Share on other sites


ConnectedToInternet() -or- !ConnectedToInternet()

Returns true or false.

No, can't do deps/conds n Reg B/A. They will be eliminated in a near future release. But they will be converted over properly so don't worry about future compatibility.

Link to comment
Share on other sites

Actually when using conditions and exclusion the proper term is like so:

ConnectedToInternet()=="False"

The above will make the entry disappear if you are connected to the internet.

YES I know it's not in the manual, the manual is in the process of being re-written and should cover everything this time. (I just hate the bookwork :P )

Nearly everything can be found in the changelog though...

Further, Can you add a condition to a registry add?

Such as "Registry After" is dependent on if the program it is intended for was installed.

How can I do both these things?

With this I would add the reg as a totally separate entry with the needed condition added in, be it looking for a file, a program is installed name or anything like that.

then just add it as a dep to the parent program.

Edited by Kelsenellenelvian
Link to comment
Share on other sites

When a condition, such as ConnectedToInternet(), is a true/false check, then don't do it like Kels said; do it like I posted.

ConnectedToInternet() - if there is a connecton, item is grayed.

!ConnectedToInternet() - if there is no connection, item is grayed. This is the more common one.

Now, when checking a name of something, like OS, then yes, do a check.

getOSver()=="XP" - if is on XP Windows then grayed.

getOSver != "Vista" - if not on a Vista Window then not grayed.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...