Need some help with this script. the script is working fine. I just want to add the s.m.a.r.t. status from the disks to the html output. The problem is that the s.m.a.r.t. status is retreived from Win32_DiskDrive. Is it possible to collect this value together with the values from Win32_LogicalDisk and display in the html file? (%smartstatus%)
Code:
Select all
Filedelete, diskinfo.htm
objWMIService := ComObjGet("winmgmts:\\.\root\cimv2")
colItems := objWMIService.ExecQuery("SELECT * FROM Win32_LogicalDisk")._NewEnum
while colItems[objItem]
ad := objItem.Caption, bd := objItem.FileSystem, cd := Round((objItem.Size / (1024 ** 3)), 2)
dd := Round((objItem.FreeSpace / (1024 ** 3)), 2), ed:= Round((100 * (objItem.FreeSpace / objItem.Size)), 2)
af := objItem.FileSystem, atype := objItem.Description,
<div style="float: left; top:0px; position: relative; left:1`%">
<TABLE width="auto"; float: left;>
<tr><td style="padding:0 6px 0 6px;font color="blue"><B>Schijf:</B> </TD><TD> <font color="blue"> %ad% </font></TD></TR>
<tr><td style="padding:0 6px 0 6px;font color="blue"> Grootte: </TD><TD> <font color="blue"> %cd% Gb</font></TD></TR>
<tr><td style="padding:0 6px 0 6px;font color="blue"> Vrij: </TD><TD> %colordisk% %dd% Gb</font></TD></TR>
<tr><td style="padding:0 6px 0 6px;font color="blue"> Vrij:`%</TD><TD> <font color="blue"> %ed% `% </font></TD></TR>
<tr><td style="padding:0 6px 0 6px;font color="blue"> Format: </TD><TD> <font color="blue"> %af% </font></TD></TR>
<tr><td style="padding:0 6px 0 6px;font color="blue"> S.M.A.R.T </TD><TD> <font color="blue"> %smartstatus% </font></TD></TR>
<tr><td></td></tr>
</TABLE>
<TABLE width="auto"; float: left;>
</TABLE>
fileappend, %htmlbody%, diskinfo.htm
run, diskinfo.htm