Source code of Windows XP (NT5)
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.

88 lines
2.2 KiB

  1. <HTML>
  2. <HEAD>
  3. <TITLE> Remote Assistance Incident Creation </TITLE>
  4. <OBJECT ID="pchealth" classid="CLSID:FC7D9E02-3F9E-11d3-93C0-00C04F72DAF7"></OBJECT>
  5. <script Language=JavaScript>
  6. var gVendorID;
  7. var gProductID;
  8. var gIncidentID = null; // SalemTicket here
  9. var gStartPage = null;
  10. function OnLoad1() {
  11. try {
  12. var i = document.URL.indexOf("?", 1);
  13. if (i > 0) {
  14. // Get SalemID
  15. gIncidentID = document.URL.slice(i+1);
  16. //alert(gIncidentID);
  17. if (gIncidentID != null
  18. && gIncidentID.length > 0
  19. && GetChannelInfo(gIncidentID) == true) {
  20. // continue
  21. gStartPage = "hcp://" + gVendorID + "/" + gStartPage +"?RcRequest=1&VID=" + gVendorID + "&PID=" + gProductID + "&ENDID=1";
  22. // alert(gStartPage);
  23. idStart.window.navigate(gStartPage);
  24. return;
  25. }
  26. else
  27. {
  28. //
  29. // Unsolicited RA
  30. //
  31. idStart.window.navigate( "hcp://CN=Microsoft%20Corporation,L=Redmond,S=Washington,C=US/Remote%20Assistance/rcbuddy.htm?Unsolicited=1" );
  32. return;
  33. }
  34. }
  35. } catch (e) {
  36. alert('Error: ' + e.Description);
  37. }
  38. // If it comes here, it failed.
  39. try {
  40. var oDeskMgr = pchealth.CreateObject_RemoteDesktopManager();
  41. oDeskMgr.Aborted();
  42. } catch (e) {
  43. }
  44. navigate("hcp://system/HomePage.htm");
  45. }
  46. function GetChannelInfo(sSalemID) {
  47. var safreg = pchealth.Channels;
  48. for(safreg.MoveFirst(); !safreg.EOF; safreg.MoveNext())
  49. {
  50. try
  51. {
  52. var chan = pchealth.CreateObject_Channel( safreg.VendorID, safreg.ProductID );
  53. for(var e = new Enumerator( chan.Incidents( 2 ) ); !e.atEnd(); e.moveNext())
  54. {
  55. var inc = e.item();
  56. if (inc.URL == sSalemID) // Find it.
  57. {
  58. gVendorID = safreg.VendorID;
  59. gProductID = safreg.ProductID;
  60. var XMLFile = inc.XMLDataFile;
  61. var oInc = pchealth.CreateObject_Incident();
  62. oInc.LoadFromXMLFile(XMLFile);
  63. gStartPage = oInc.StartPage;
  64. return true;
  65. }
  66. }
  67. }
  68. catch(e)
  69. {
  70. var L_FUNCFAIL_MSG = "GetChannelInfo failed: ";
  71. alert(L_FUNCFAIL_MSG + e.Description);
  72. }
  73. }
  74. return false;
  75. }
  76. </script>
  77. </HEAD>
  78. <frameset COLS="100%" onload="OnLoad1()">
  79. <frame name="idStart">
  80. </frameset>
  81. </HTML>