Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

72 lines
1.8 KiB

  1. <HTML>
  2. <HEAD>
  3. <META NAME="GENERATOR" Content="Microsoft Developer Studio">
  4. <META HTTP-EQUIV="Content-Type" content="text/html; charset=iso-8859-1">
  5. <OBJECT ID=pchealth classid=CLSID:FC7D9E02-3F9E-11d3-93C0-00C04F72DAF7></OBJECT>
  6. <TITLE>Connection Test</TITLE>
  7. </HEAD>
  8. <BODY>
  9. <SCRIPT LANGUAGE=javascript>
  10. <!--
  11. function Print( line )
  12. {
  13. out.innerHTML = out.innerHTML + line + "<BR>";
  14. }
  15. function button_exec()
  16. {
  17. var strPrefix = new Array(
  18. 'Scheme HTTP ',
  19. 'Scheme HTTP ',
  20. 'Scheme HCP ',
  21. 'Scheme FTP ',
  22. 'Scheme MS-ITS '
  23. );
  24. var strArray = new Array(
  25. 'http://www.microsoft.com',
  26. 'http://www.junkmicrosoft.com',
  27. 'hcp://system/test5_connection.htm',
  28. 'ftp://ftp.test.org',
  29. 'ms-its:d:\windows\help\windows.chm::/app_system_restore_process.htm'
  30. );
  31. var numArray = 4 ;
  32. Print('PCHealth Connection class testing');
  33. if ( pchealth.Connectivity.NetworkAlive() )
  34. {
  35. Print('Network Alive');
  36. }
  37. else
  38. Print('Network not alive');
  39. Print('Testing DestinationReachable URLs');
  40. for ( i = 0 ; i < numArray ; i++ )
  41. {
  42. if ( pchealth.Connectivity.DestinationReachable(strArray[i]) )
  43. {
  44. Print(strPrefix[i] + strArray[i] + ' reached');
  45. }
  46. else
  47. Print(strPrefix[i] + strArray[i] + ' not reached');
  48. }
  49. Print('End of testing<br><br><br>');
  50. }
  51. //-->
  52. </SCRIPT>
  53. <INPUT type="button" value="Start" onClick="button_exec();">&nbsp;
  54. <DIV ID=out></DIV>
  55. </BODY>
  56. </HTML>