<html>
<head>
<title>磁盘空间查看脚本</title>
<hta:application
applicationname="磁盘空间查看脚"
border="dialog"
borderstyle="normal"
caption="yes"
contextmenu="no"
maximizebutton="no"
minimizebutton="yes"
navigable="no"
scroll="yes"
selection="no"
showintaskbar="yes"
singleinstance="yes"
sysmenu="yes"
version="1.0"
windowstate="normal"
>
<scriptlanguage="vbscript">
<!--Insertcode,subroutines,andfunctionshere-->
window.resizeTo500,420
ileft=(window.screen.width-500)/2
itop=(window.screen.height-420)/2
window.moveToileft,itop
SubWindow_onLoad
GetDiskSpace
EndSub
SubGetDiskSpace
ConstHARD_DISK=3
ConstSize=1048576
strComputer="."
SetobjWMIService=GetObject("winmgmts:"_
&"{impersonationLevel=impersonate}!//"&strComputer&"/root/cimv2")
SetcolDisks=objWMIService.ExecQuery_
("Select*fromWin32_LogicalDiskWhereDriveType="&HARD_DISK&"")
strHTML="<tablealign=centerwidth=95%borderColor=#698cc2border='1'cellSpacing='0'cellpadding='1'>"
strHTML=strHTML&"<tr>"
strHTML=strHTML&"<tdwidth=110pxalign=center><fontsize=2><b>"&"分区"&"</b></td>"
strHTML=strHTML&"<tdwidth=110pxalign=center><fontsize=2><b>"&"容量"&"</b></td>"