Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Saturday, August 23, 2025 
 
slxdeveloper.com Community Forums  
   
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
 Architect Forums - SalesLogix Scripting & Customization
Forum to discuss writing script in Architect plugins for SalesLogix & general SalesLogix customization topics (for Windows client only). View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to SalesLogix Scripting & Customization | New ThreadView:  Search:  
 Author  Thread: Check intranet avaliability
Kevin Austin
Posts: 105
 
Check intranet avaliabilityYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 19 May 08 7:04 AM
Hi folks,

I'm looking to create a button that links to an intranet based web page, problem is sometimes users of the system might not be connected to the network so if the intranet page is unavaliable I want it to say this rather than attempt to load the web page and fail, any ideas?

Cheers
Kevin
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: Check intranet avaliabilityYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 19 May 08 11:24 AM
I posted your answer here: http://customerfx.com/pages/crmdeveloper/2008/05/19/ping-a-remote-server-using-vbscript.aspx

Enjoy

-Ryan
[Reply][Quote]
Kevin Austin
Posts: 105
 
Re: Check intranet avaliabilityYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 22 May 08 3:43 AM
Cheers Ryan, appreciated!
[Reply][Quote]
Bob (RJ)Ledger
Posts: 1103
Top 10 forum poster: 1103 posts
 
Re: Check intranet avaliabilityYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 23 May 08 6:52 AM
Here's another way to do it using WMI:


Function Run_VB_Script()
Dim StrComputer
Dim strPingStatus

On Error Resume Next
strComputer = "www.yahoo.com"
strPingStatus = PingStatus(strComputer)
If strPingStatus = "Success" Then
MsgBox"Success pinging " & strComputer
Else
MsgBox "Failure pinging " & strComputer & ": " & strPingStatus
End If
End Function



' PingStatus
Function PingStatus(ByVal strComputer)
Dim strWorkstation

On Error Resume Next

strWorkstation = "."
Set objWMIService = System.GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strWorkstation & "\root\cimv2")
Set colPings = objWMIService.ExecQuery _
("SELECT * FROM Win32_PingStatus WHERE Address = '" & strComputer & "'")
For Each objPing in colPings
Select Case objPing.StatusCode
Case 0 PingStatus = "Success"
Case 11001 PingStatus = "Status code 11001 - Buffer Too Small"
Case 11002 PingStatus = "Status code 11002 - Destination Net Unreachable"
Case 11003 PingStatus = "Status code 11003 - Destination Host Unreachable"
Case 11004 PingStatus = "Status code 11004 - Destination Protocol Unreachable"
Case 11005 PingStatus = "Status code 11005 - Destination Port Unreachable"
Case 11006 PingStatus = "Status code 11006 - No Resources"
Case 11007 PingStatus = "Status code 11007 - Bad Option"
Case 11008 PingStatus = "Status code 11008 - Hardware Error"
Case 11009 PingStatus = "Status code 11009 - Packet Too Big"
Case 11010 PingStatus = "Status code 11010 - Request Timed Out"
Case 11011 PingStatus = "Status code 11011 - Bad Request"
Case 11012 PingStatus = "Status code 11012 - Bad Route"
Case 11013 PingStatus = "Status code 11013 - TimeToLive Expired Transit"
Case 11014 PingStatus = "Status code 11014 - TimeToLive Expired Reassembly"
Case 11015 PingStatus = "Status code 11015 - Parameter Problem"
Case 11016 PingStatus = "Status code 11016 - Source Quench"
Case 11017 PingStatus = "Status code 11017 - Option Too Big"
Case 11018 PingStatus = "Status code 11018 - Bad Destination"
Case 11032 PingStatus = "Status code 11032 - Negotiating IPSEC"
Case 11050 PingStatus = "Status code 11050 - General Failure"
Case Else PingStatus = "Status code " & objPing.StatusCode & _
" - Unable to determine cause of failure."
End Select
Next
End Function



--
RJLedger - rjlSystems
"...Customer First..."
[Reply][Quote]
 Page 1 of 1 
  You can subscribe to receive a daily forum digest in your user profile. View the site code of conduct for posting guidelines.

   Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2025 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 8/23/2025 6:03:11 PM