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

<HTML>
<HEAD>
<TITLE> Remote Assistance Incident Creation </TITLE>
<OBJECT ID="pchealth" classid="CLSID:FC7D9E02-3F9E-11d3-93C0-00C04F72DAF7"></OBJECT>
<script Language=JavaScript>
var gVendorID;
var gProductID;
var gIncidentID = null; // SalemTicket here
var gStartPage = null;
function OnLoad1() {
try {
var i = document.URL.indexOf("?", 1);
if (i > 0) {
// Get SalemID
gIncidentID = document.URL.slice(i+1);
//alert(gIncidentID);
if (gIncidentID != null
&& gIncidentID.length > 0
&& GetChannelInfo(gIncidentID) == true) {
// continue
gStartPage = "hcp://" + gVendorID + "/" + gStartPage +"?RcRequest=1&VID=" + gVendorID + "&PID=" + gProductID + "&ENDID=1";
// alert(gStartPage);
idStart.window.navigate(gStartPage);
return;
}
else
{
//
// Unsolicited RA
//
idStart.window.navigate( "hcp://CN=Microsoft%20Corporation,L=Redmond,S=Washington,C=US/Remote%20Assistance/rcbuddy.htm?Unsolicited=1" );
return;
}
}
} catch (e) {
alert('Error: ' + e.Description);
}
// If it comes here, it failed.
try {
var oDeskMgr = pchealth.CreateObject_RemoteDesktopManager();
oDeskMgr.Aborted();
} catch (e) {
}
navigate("hcp://system/HomePage.htm");
}
function GetChannelInfo(sSalemID) {
var safreg = pchealth.Channels;
for(safreg.MoveFirst(); !safreg.EOF; safreg.MoveNext())
{
try
{
var chan = pchealth.CreateObject_Channel( safreg.VendorID, safreg.ProductID );
for(var e = new Enumerator( chan.Incidents( 2 ) ); !e.atEnd(); e.moveNext())
{
var inc = e.item();
if (inc.URL == sSalemID) // Find it.
{
gVendorID = safreg.VendorID;
gProductID = safreg.ProductID;
var XMLFile = inc.XMLDataFile;
var oInc = pchealth.CreateObject_Incident();
oInc.LoadFromXMLFile(XMLFile);
gStartPage = oInc.StartPage;
return true;
}
}
}
catch(e)
{
var L_FUNCFAIL_MSG = "GetChannelInfo failed: ";
alert(L_FUNCFAIL_MSG + e.Description);
}
}
return false;
}
</script>
</HEAD>
<frameset COLS="100%" onload="OnLoad1()">
<frame name="idStart">
</frameset>
</HTML>