I'm trying to 'slicken' up our update procedures. Is there a way to test if there's a internet connection? The idea is that if there is a connection I can automatically download the file, if not prompt them for a location to look for it (which would have been downloaded elsewhere and brought in on a flash drive, etc.)
thanks,
bruce
Testing Internet
Testing Internet
There are only 10 kinds of people - those who understand binary and those who don't 

Re: Testing Internet
How do you intend to automatically download the file?
The eXpress train is coming - and it has more cars.
Re: Testing Internet
I use a library from Marshallsoft for ftp and email. It works great for me. If I try to download without a connection it tries for a bit then gives an error msg.
I'd prefer to be able to know whether or not to even try to download.
I'd prefer to be able to know whether or not to even try to download.
There are only 10 kinds of people - those who understand binary and those who don't 

Re: Testing Internet
Hi, Bruce.
The "Windows Management Instrumentation" (WMI) should lead to a result. Look at the samples (active x) here:
http://www.activexperts.com/activmonito ... mi/samples
The "Windows Management Instrumentation" (WMI) should lead to a result. Look at the samples (active x) here:
http://www.activexperts.com/activmonito ... mi/samples
Best regards,
Tom
"Did I offend you?"
"No."
"Okay, give me a second chance."
Tom
"Did I offend you?"
"No."
"Okay, give me a second chance."
Re: Testing Internet
Hi Bruce,
The Marshalsoft functions always return a value. If that value is negative, then there is something wrong. You can test on them.
The Marshalsoft functions always return a value. If that value is negative, then there is something wrong. You can test on them.
Code: Select all
Code = XfceConnect(0, @cServer, @cGebruiker, @cPassword)
if Code <0
XfceClose(0)
XfceRelease()
return .F.
endif
Code = XfceSetLocalDir(0, @cLocalDir)
if Code < 0
XfceClose(0)
XfceRelease()
sleep(200)
return .F.
endif
Code = XfceSetServerDir(0, @cServerDir)
if Code < 0
XfceClose(0)
XfceRelease()
sleep(200)
return .F.
endif
Re: Testing Internet
thanks... I'll play with it in the next few days.
There are only 10 kinds of people - those who understand binary and those who don't 
