home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DOS/V Power Report 2000 April
/
VPR0004B.BIN
/
DRIVER
/
COMPAQ
/
SP12255
/
sp12255.exe
/
DMWEBC1.CAB
/
HARDDISK.TPL
< prev
next >
Wrap
Text File
|
1999-06-22
|
16KB
|
539 lines
<HTML>
<!-- $Id -->
<!-- Copyright (C) 1997 Compaq Computer Corporation -->
<HEAD>
<!#IDEDEV.JS>
<!#SCSIDEV.JS>
<!#FLOPPY.JS>
<SCRIPT LANGUAGE="JavaScript">
<!#TABLES.JS>
<!#COND.JS>
</SCRIPT>
</HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!*, DMTF|Disks|*, 1, dmiStorageType>
<!*, DMTF|Disks|*, 2, dmiDevIndex>
<!*, DMTF|Disks|*, 3, dmiDevIntfType>
<!*, DMTF|Disks|*, 4, dmiDevDesc>
<!*, DMTF|Disks|*, 6, dmiDriveRemovable>
<!*, DMTF|Disks|*, 7, dmiMediaRemovable>
<!*, DMTF|Disks|*, 10, dmiNumCyl>
<!*, DMTF|Disks|*, 11, dmiNumSect>
<!*, DMTF|Disks|*, 12, dmiNumHeads>
<!*, DMTF|Disks|*, 15, dmiSectorSize>
<!*, DMTF|Disks|*, 16, dmiTotalSize>
<!*, DMTF|Disks|*, 17, dmiNumBadSector>
<!*, DMTF|Disks|*, 18, dmiNumPartition>
<!*, DMTF|Disks|*, 20, DiskFRUIndex>
<!*, DMTF|Disks|*, 21, DiskOsIndex>
<!*, DMTF|FRU|*, 1, FRUIndex>
<!*, DMTF|FRU|*, 5, Model>
<!*, DMTF|FRU|*, 7, SerialNumber>
<!*, DMTF|FRU|*, 8, RevisionLevel>
<!*, DMTF|Logical Drives|*, 3, dmiDriveType>
<!*, DMTF|Operational State|*, 1, OsIndex>
<!*, DMTF|Operational State|*, 10, OsCurrentErrorStatus>
DiskStatus = new Array();
DiskStatus[0] = "Other";
DiskStatus[1] = "Unknown";
DiskStatus[2] = "OK";
DiskStatus[3] = "Non-critical";
DiskStatus[4] = "Critical";
DiskStatus[5] = "Non-recoverable";
deviceId = 0;
// Display Storage Devices info
for ( i = 0; i < dmiDevIndex.length; i++)
{
if (dmiDevIntfType[i] == "Floppy Disk Interface" || dmiDriveType[i] == "Floppy Drive")
{
Floppy();
break;
}
}
for ( i = 0; i < dmiDevIndex.length; i++)
{
if (dmiStorageType[i] == "Compact Disk" && dmiDevIntfType[i] != "SCSI" && dmiDevIntfType[i] != "IDE" && dmiDevIntfType[i] != "Enhanced ATA/IDE")
{
CompactDisk();
break;
}
}
for ( i = 0; i < dmiDevIndex.length; i++)
{
if (dmiStorageType[i] == "Hard Disk" && dmiDevIntfType[i] != "SCSI" && dmiDevIntfType[i] != "IDE" && dmiDevIntfType[i] != "Enhanced ATA/IDE")
{
HardDrive();
break;
}
}
for ( i = 0; i < dmiDevIndex.length; i++)
{
if (dmiDevIntfType[i] == "IDE" || dmiDevIntfType[i] == "Enhanced ATA/IDE")
{
IDE();
break;
}
}
for ( i = 0; i < dmiDevIndex.length; i++)
{
if (dmiDevIntfType[i] == "SCSI")
{
SCSI();
break;
}
}
function HardDrive()
{
deviceId = 1;
for ( i = 0; i < dmiDevIndex.length; i++)
{
if (dmiStorageType[i] == "Hard Disk" && dmiDevIntfType[i] != "SCSI" && dmiDevIntfType[i] != "IDE" && dmiDevIntfType[i] != "Enhanced ATA/IDE")
{
deviceId = deviceId + 1;
tableCap = "Hard Disk Information - " + deviceId;
deviceCond = new cpqCondition(1);
if (DiskOsIndex[i] > 0)
{
ActualOsIndex = -1;
for (k = 0; k < OsIndex.length; k++)
{
if (DiskOsIndex[i] == OsIndex[k])
{
ActualOsIndex = k;
break;
}
}
if (ActualOsIndex >= 0)
{
for (j = 0; j <= DiskStatus.length - 1; j++)
{
if (OsCurrentErrorStatus[ActualOsIndex] == DiskStatus[j])
{
if (j == 5)
deviceCond = new cpqCondition(4);
else if (j == 3 || j == 4)
deviceCond = new cpqCondition(3);
else if (j == 2)
deviceCond = new cpqCondition(2);
else if (j < 2)
deviceCond = new cpqCondition(1);
break;
}
}
}
}
// tableCap = deviceCond.image() + tableCap;
writeTableLabel( tableCap, "" );
writeTableHead();
writeSingleTableRowOrBlank( deviceCond.imageSmall() + " " + sDriveIndex + ":", dmiDevIndex[i]);
writeSingleTableRowOrBlank( "Storage Type:", dmiStorageType[i]);
writeSingleTableRowOrBlank( "Interface Type:", dmiDevIntfType[i]);
writeSingleTableRowOrBlank( "Interface Description:", dmiDevDesc[i]);
writeSingleTableRowOrBlank( "Removable Drive:", dmiDriveRemovable[i]);
writeSingleTableRowOrBlank( "Removable Media:", dmiMediaRemovable[i]);
writeSingleTableRowOrBlank( "Number of Physical Cylinders:", dmiNumCyl[i]);
writeSingleTableRowOrBlank( "Number of Physical Sectors:", dmiNumSect[i]);
writeSingleTableRowOrBlank( "Number of Physical Heads:", dmiNumHeads[i]);
writeSingleTableRowOrBlank( "Sector Size:", dmiSectorSize[i] + " Bytes");
writeSingleTableRowOrBlank( "Total Physical Size:", Math.round((dmiTotalSize[i]/1024/1024) * 100)/100 + " GB");
writeSingleTableRowOrBlank( "Current Bad Blocks or Sectors:", dmiNumBadSector[i]);
writeSingleTableRowOrBlank( "Partitions:", dmiNumPartition[i]);
if (DiskFRUIndex[i] > 0)
{
ActualFRUIndex = -1;
for (k = 0; k < FRUIndex.length; k++)
{
if (DiskFRUIndex[i] == FRUIndex[k])
{
ActualFRUIndex = k;
break;
}
}
if (ActualFRUIndex >= 0)
{
writeSingleTableRowOrBlank( "Model:", Model[ActualFRUIndex]);
writeSingleTableRowOrBlank( "Serial Number:", SerialNumber[ActualFRUIndex]);
writeSingleTableRowOrBlank( "Firmware Version:", RevisionLevel[ActualFRUIndex]);
}
}
else
{
writeSingleTableRow( "Model:", "");
writeSingleTableRow( "Serial Number:", "");
writeSingleTableRow( "Firmware Version:", "");
}
if (i < dmiDevIndex.length - 1)
writeSingleTableRow(" ", " ");
}
}
writeTableTail();
document.write("<BR>");
}
function IDE()
{
deviceId = 1;
for(i = 0; i < dmiDevIndex.length; i++)
{
if (dmiDevIntfType[i] == "IDE" || dmiDevIntfType[i] == "Enhanced ATA/IDE")
{
tableCap = sIDEDevice + " " + deviceId;
deviceCond = new cpqCondition(1);
diskAction = diskActionText[1];
if (DiskOsIndex[i] > 0)
{
ActualOsIndex = -1;
for (k = 0; k < OsIndex.length; k++)
{
if (DiskOsIndex[i] == OsIndex[k])
{
ActualOsIndex = k;
break;
}
}
if (ActualOsIndex >= 0)
{
for (j = 0; j <= DiskStatus.length - 1; j++)
{
if (OsCurrentErrorStatus[ActualOsIndex] == DiskStatus[j])
{
if (j == 5)
finalStatusIndex = 4;
else if (j == 3 || j == 4)
finalStatusIndex = 3;
else if (j == 2)
finalStatusIndex = 2;
else if (j < 2)
finalStatusIndex = 1;
deviceCond = new cpqCondition(finalStatusIndex);
diskAction = diskActionText[finalStatusIndex];
break;
}
}
}
}
// tableCap = deviceCond.image() + tableCap;
writeTableLabel( tableCap, sIDEDeviceDetails);
writeTableHead();
writeSingleTableRowOrBlank( deviceCond.imageSmall() + " " + sDriveIndex + ":", dmiDevIndex[i]);
if (DiskFRUIndex[i] > 0)
{
ActualFRUIndex = -1;
for (k = 0; k < FRUIndex.length; k++)
{
if (DiskFRUIndex[i] == FRUIndex[k])
{
ActualFRUIndex = k;
break;
}
}
if (ActualFRUIndex >= 0)
{
writeSingleTableRowOrBlank( sModel + ":", Model[ActualFRUIndex]);
writeSingleTableRowOrBlank( sSerialNumber + ":", SerialNumber[ActualFRUIndex]);
writeSingleTableRowOrBlank( sFirmwareVersion + ":", RevisionLevel[ActualFRUIndex]);
}
}
else
{
writeSingleTableRow( sModel + ":", "");
writeSingleTableRow( sSerialNumber + ":", "");
writeSingleTableRow( sFirmwareVersion + ":", "");
}
writeSingleTableRowOrBlank( sDeviceType + ":", dmiStorageType[i]);
// writeSingleTableRowOrBlank( "Removable Media:", dmiMediaRemovable[i]);
// writeSingleTableRowOrBlank( "Media Present:", dmiMediaLoaded[i]);
if (dmiStorageType[i] != "Compact Disk")
{
writeSingleTableRowOrBlank( sCapacity + ":", Math.round((dmiTotalSize[i]/1024/1024) * 100)/100 + " GB");
writeSingleTableRowOrBlank( sHeads + ":", dmiNumHeads[i]);
writeSingleTableRowOrBlank( sCylinders + ":", dmiNumCyl[i]);
writeSingleTableRowOrBlank( sSectorsperTrack + ":", dmiNumSect[i]);
}
<!-- ==================== ACTION ==================== -->
writeSingleTableRowOrBlank( "", " ");
writeSingleTableRowOrBlank(sAction + ":", diskAction);
<!-- ================================================ -->
deviceId = deviceId + 1;
}
}
writeTableTail();
document.write("<BR>");
}
function SCSI()
{
deviceId = 0;
for ( i = 0; i < dmiDevIndex.length; i++)
{
if (dmiDevIntfType[i] == "SCSI")
{
deviceId = deviceId + 1;
tableCap = sSCSIDriveInformation + deviceId;
finalStatusIndex = 1;
deviceCond = new cpqCondition(finalStatusIndex);
if (DiskOsIndex[i] > 0)
{
ActualOsIndex = -1;
for (k = 0; k < OsIndex.length; k++)
{
if (DiskOsIndex[i] == OsIndex[k])
{
ActualOsIndex = k;
break;
}
}
if (ActualOsIndex >= 0)
{
for (j = 0; j <= DiskStatus.length - 1; j++)
{
if (OsCurrentErrorStatus[ActualOsIndex] == DiskStatus[j])
{
if (j == 5)
finalStatusIndex = 4;
else if (j == 3 || j == 4)
finalStatusIndex = 3;
else if (j == 2)
finalStatusIndex = 2;
else if (j < 2)
finalStatusIndex = 1;
deviceCond = new cpqCondition(finalStatusIndex);
break;
}
}
}
}
// tableCap = deviceCond.image() + tableCap;
writeTableLabel( tableCap, "" );
writeTableHead();
writeSingleTableRowOrBlank( deviceCond.imageSmall() + " " + sDriveIndex + ":", dmiDevIndex[i]);
writeSingleTableRowOrBlank( sStorageType + ":", dmiStorageType[i]);
writeSingleTableRowOrBlank( sInterfaceDescription + ":", dmiDevDesc[i]);
writeSingleTableRowOrBlank( sRemovableDrive + ":", dmiDriveRemovable[i]);
writeSingleTableRowOrBlank( sRemovableMedia + ":", dmiMediaRemovable[i]);
writeSingleTableRowOrBlank( sNumCyl + ":", dmiNumCyl[i]);
writeSingleTableRowOrBlank( sNumSec + ":", dmiNumSect[i]);
writeSingleTableRowOrBlank( sNumHeads + ":", dmiNumHeads[i]);
writeSingleTableRowOrBlank( sSectorSize + ":", dmiSectorSize[i] + " Bytes");
writeSingleTableRowOrBlank( sTotalPhysicalSize + ":", Math.round((dmiTotalSize[i]/1024/1024) * 100)/100 + " GB");
writeSingleTableRowOrBlank( sBadBlockOrSector + ":", dmiNumBadSector[i]);
writeSingleTableRowOrBlank( sPartitions + ":", dmiNumPartition[i]);
if (DiskFRUIndex[i] > 0)
{
ActualFRUIndex = -1;
for (k = 0; k < FRUIndex.length; k++)
{
if (DiskFRUIndex[i] == FRUIndex[k])
{
ActualFRUIndex = k;
break;
}
}
if (ActualFRUIndex >= 0)
{
writeSingleTableRowOrBlank( sModel + ":", Model[ActualFRUIndex]);
writeSingleTableRowOrBlank( sSerialNumber + ":", SerialNumber[ActualFRUIndex]);
writeSingleTableRowOrBlank( sFirmwareVersion + ":", RevisionLevel[ActualFRUIndex]);
}
}
else
{
writeSingleTableRow( sModel + ":", "");
writeSingleTableRow( sSerialNumber + ":", "");
writeSingleTableRow( sFirmwareVersion + ":", "");
}
if (i < dmiDevIndex.length - 1)
writeSingleTableRow(" ", " ");
writeSingleTableRowOrBlank( "", " ");
writeSingleTableRowOrBlank(sAction + ":", diskAction = diskActionText[finalStatusIndex]);
}
}
writeTableTail();
document.write("<BR>");
}
function Floppy()
{
<!*, DMTF|Logical Drives|*, 2, dmiDriveName>
<!*, DMTF|Logical Drives|*, 3, dmiDriveType>
<!*, DMTF|Logical Drives|*, 4, dmiDriveSize>
writeTableLabel(sDiskette + " " + sDrive + " " + sInfo);
writeTableHead();
writeColumnTableHeaderRow(sDrive, sType);
DriveLabel = ""
for ( i = 0; i < dmiDriveName.length; i++)
{
DriveLabel = dmiDriveName[i].substring(0, 1);
DriveLabel = DriveLabel.toUpperCase();
if (dmiDriveType[i] == "Floppy Drive" || DriveLabel == "A" || DriveLabel == "B")
{
if (dmiDriveSize[i] == "360")
writeColumnTableDataRow( dmiDriveName[i], "360K (5.25 inch)");
else
if (dmiDriveSize[i] == "720")
writeColumnTableDataRow( dmiDriveName[i], "720K (3.5 inch)");
else
if (dmiDriveSize[i] == "1228")
writeColumnTableDataRow( dmiDriveName[i], "1.2 Megabyte (5.25 inch)");
else
if (dmiDriveSize[i] == "1423")
writeColumnTableDataRow( dmiDriveName[i], "1.44 Megabyte (3.5 inch)");
else
if (dmiDriveSize[i] == 123006)
writeColumnTableDataRow( dmiDriveName[i], "120 Megabyte (3.5 inch)");
else
writeColumnTableDataRow( dmiDriveName[i], "Unknown");
}
}
writeTableTail();
document.write("<BR>");
}
function CompactDisk()
{
deviceId = 1;
for(i = 0; i < dmiDevIndex.length; i++)
{
if (dmiStorageType[i] == "Compact Disk" && dmiDevIntfType[i] != "SCSI" && dmiDevIntfType[i] != "IDE" && dmiDevIntfType[i] != "Enhanced ATA/IDE")
{
tableCap = sCompactDisk + " " + deviceId;
deviceCond = new cpqCondition(1);
diskAction = diskActionText[1];
if (DiskOsIndex[i] > 0)
{
ActualOsIndex = -1;
for (k = 0; k < OsIndex.length; k++)
{
if (DiskOsIndex[i] == OsIndex[k])
{
ActualOsIndex = k;
break;
}
}
if (ActualOsIndex >= 0)
{
for (j = 0; j <= DiskStatus.length - 1; j++)
{
if (OsCurrentErrorStatus[ActualOsIndex] == DiskStatus[j])
{
if (j == 5)
finalStatusIndex = 4;
else if (j == 3 || j == 4)
finalStatusIndex = 3;
else if (j == 2)
finalStatusIndex = 2;
else if (j < 2)
finalStatusIndex = 1;
deviceCond = new cpqCondition(finalStatusIndex);
diskAction = diskActionText[finalStatusIndex];
break;
}
}
}
}
// tableCap = deviceCond.image() + tableCap;
writeTableLabel( tableCap, "");
writeTableHead();
writeSingleTableRowOrBlank( deviceCond.imageSmall() + " " + sDriveIndex + ":", dmiDevIndex[i]);
if (DiskFRUIndex[i] > 0)
{
ActualFRUIndex = -1;
for (k = 0; k < FRUIndex.length; k++)
{
if (DiskFRUIndex[i] == FRUIndex[k])
{
ActualFRUIndex = k;
break;
}
}
if (ActualFRUIndex >= 0)
{
writeSingleTableRowOrBlank( sModel + ":", Model[ActualFRUIndex]);
writeSingleTableRowOrBlank( sSerialNumber + ":", SerialNumber[ActualFRUIndex]);
writeSingleTableRowOrBlank( sFirmwareVersion + ":", RevisionLevel[ActualFRUIndex]);
}
}
else
{
writeSingleTableRow( sModel + ":", "");
writeSingleTableRow( sSerialNumber + ":", "");
writeSingleTableRow( sFirmwareVersion + ":", "");
}
writeSingleTableRowOrBlank( sDeviceType + ":", dmiStorageType[i]);
// writeSingleTableRowOrBlank( "Removable Media:", dmiMediaRemovable[i]);
// writeSingleTableRowOrBlank( "Media Present:", dmiMediaLoaded[i]);
if (dmiStorageType[i] != "Compact Disk")
{
writeSingleTableRowOrBlank( sCapacity + ":", Math.round((dmiTotalSize[i]/1024/1024) * 100)/100 + " GB");
writeSingleTableRowOrBlank( sHeads + ":", dmiNumHeads[i]);
writeSingleTableRowOrBlank( sCylinders + ":", dmiNumCyl[i]);
writeSingleTableRowOrBlank( sSectorsperTrack + ":", dmiNumSect[i]);
}
<!-- ==================== ACTION ==================== -->
writeSingleTableRowOrBlank( "", " ");
writeSingleTableRowOrBlank(sAction + ":", diskAction);
<!-- ================================================ -->
deviceId = deviceId + 1;
}
}
writeTableTail();
document.write("<BR>");
}
</SCRIPT>
</HTML>