<html>
<头>
<title>磁盘空间查看脚本</title>
<hta:应用程序
applicationName =“磁盘空间查看脚”
边界=“对话”
borderstyle =“正常”
字幕=“是”
contextMenu =“否”
最大化布顿=“否”
最小化=“是”
可通道=“否”
滚动=“是”
选择=“否”
ShowIntaskBar =“是”
singleSinstance =“是”
sysmenu =“是”
版本=“ 1.0”
WindowState =“正常”
>
<ScriptLanguage =“ VBScript”>
<! - 插入码,子例程和functions->
Window.Resizeto500,420
ileft =(window.screen.width-500)/2
itop =(window.screen.height-420)/2
window.movetoileft,itop
SupWindow_Onload
GetDiskSpace
endub
SubgetDiskSpace
cousthard_disk = 3
构成= 1048576
strcomputer =“。”。
setObjwmiservice = getObject(“ winmgmts:” _
&“ {ImpersonationLevel = imponate}!//”&strcomputer&“/root/cimv2”)
setColdisks = objwmiservice.execquery_
(“选择*fromwin32_logicaldiskwheredrivetype =”&hard_disk&“”)
strhtml =“ <tablealign = centerWidth = 95%bordercolor =#698cc2border ='1'cellSpacing ='0'0'CellPadding ='1'1'>”
strhtml = strhtml&“ <tr>”
strhtml = strhtml&“ <tdwidth = 110pxalign = center> <fontsize = 2> <b>“&”&“分区”&“ </b> </td>”
strhtml = strhtml&“ <tdwidth = 110pxalign = center> <fontsize = 2> <b>“&”&“容量”&“ </b> </td>”