圆月山庄资源网 Design By www.vgjia.com
<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"
>
<script language="vbscript">
<!-- Insert code, subroutines, and functions here -->
window.resizeTo 500, 420
ileft=(window.screen.width-500)/2
itop=(window.screen.height-420)/2
window.moveTo ileft,itop
Sub Window_onLoad
GetDiskSpace
End Sub
Sub GetDiskSpace
Const HARD_DISK = 3
Const Size = 1048576
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colDisks = objWMIService.ExecQuery _
("Select * from Win32_LogicalDisk Where DriveType = " & HARD_DISK & "")
strHTML = "<table align=center width=95% borderColor=#698cc2 border='1' cellSpacing='0' cellpadding='1'>"
strHTML = strHTML & "<tr>"
strHTML = strHTML & "<td width=110px align=center><font size=2><b>" & "分区" & "</b></td>"
strHTML = strHTML & "<td width=110px align=center><font size=2><b>" & "容量" & "</b></td>"
strHTML = strHTML & "<td width=110px align=center><font size=2><b>" & "已用" & "</b></td>"
strHTML = strHTML & "<td width=110px align=center><font size=2><b>" & "未用" & "</b></td>"
strHTML = strHTML & "<td width=110px align=center><font size=2><b>" & "空闲" & "</b></td>"
For Each objDisk In colDisks
intFreeSpace = objDisk.FreeSpace/Size
intTotalSpace = objDisk.Size/Size
pctFreeSpace = intFreeSpace/Size/ intTotalSpace/Size
infFuLin = intTotalSpace-intFreeSpace
DeviceID = objDisk.DeviceID
strHTML = strHTML & "<tr>"
strHTML = strHTML & "<td width=110px align=center>" & DeviceID & "</td>"
strHTML = strHTML & "<td width=110px align=right>" & FormatNumber(intTotalSpace,2,-1,-1,0) & "</td>"
strHTML = strHTML & "<td width=110px align=right><font color=#DB2C00>" & FormatNumber(infFuLin,2,-1,-1,0) & "</td>"
strHTML = strHTML & "<td width=110px align=right><font color=#008080>" & FormatNumber(intFreeSpace,2,-1,-1,0) & "</td>"
strHTML = strHTML & "<td width=110px align=right>" & FormatPercent(intFreeSpace/intTotalSpace) & "</td>"
Next
strHTML = strHTML & "</table>"
DataArea.InnerHTML = strHTML
End Sub
</script>
</head>
<body>
<!-- HTML goes here -->
<table align=center width=95%><font color="#C63358"><b>磁盘空间查看脚本</b></font><br>
<font size="2">显示各磁盘分区使用情况(<font color="#FF0000">/MB</font>)</font></font></table>
<body bgcolor="#99CCFF">
<span id = "DataArea"></span>
</body>
</html>
保存为hta文件.
<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"
>
<script language="vbscript">
<!-- Insert code, subroutines, and functions here -->
window.resizeTo 500, 420
ileft=(window.screen.width-500)/2
itop=(window.screen.height-420)/2
window.moveTo ileft,itop
Sub Window_onLoad
GetDiskSpace
End Sub
Sub GetDiskSpace
Const HARD_DISK = 3
Const Size = 1048576
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colDisks = objWMIService.ExecQuery _
("Select * from Win32_LogicalDisk Where DriveType = " & HARD_DISK & "")
strHTML = "<table align=center width=95% borderColor=#698cc2 border='1' cellSpacing='0' cellpadding='1'>"
strHTML = strHTML & "<tr>"
strHTML = strHTML & "<td width=110px align=center><font size=2><b>" & "分区" & "</b></td>"
strHTML = strHTML & "<td width=110px align=center><font size=2><b>" & "容量" & "</b></td>"
strHTML = strHTML & "<td width=110px align=center><font size=2><b>" & "已用" & "</b></td>"
strHTML = strHTML & "<td width=110px align=center><font size=2><b>" & "未用" & "</b></td>"
strHTML = strHTML & "<td width=110px align=center><font size=2><b>" & "空闲" & "</b></td>"
For Each objDisk In colDisks
intFreeSpace = objDisk.FreeSpace/Size
intTotalSpace = objDisk.Size/Size
pctFreeSpace = intFreeSpace/Size/ intTotalSpace/Size
infFuLin = intTotalSpace-intFreeSpace
DeviceID = objDisk.DeviceID
strHTML = strHTML & "<tr>"
strHTML = strHTML & "<td width=110px align=center>" & DeviceID & "</td>"
strHTML = strHTML & "<td width=110px align=right>" & FormatNumber(intTotalSpace,2,-1,-1,0) & "</td>"
strHTML = strHTML & "<td width=110px align=right><font color=#DB2C00>" & FormatNumber(infFuLin,2,-1,-1,0) & "</td>"
strHTML = strHTML & "<td width=110px align=right><font color=#008080>" & FormatNumber(intFreeSpace,2,-1,-1,0) & "</td>"
strHTML = strHTML & "<td width=110px align=right>" & FormatPercent(intFreeSpace/intTotalSpace) & "</td>"
Next
strHTML = strHTML & "</table>"
DataArea.InnerHTML = strHTML
End Sub
</script>
</head>
<body>
<!-- HTML goes here -->
<table align=center width=95%><font color="#C63358"><b>磁盘空间查看脚本</b></font><br>
<font size="2">显示各磁盘分区使用情况(<font color="#FF0000">/MB</font>)</font></font></table>
<body bgcolor="#99CCFF">
<span id = "DataArea"></span>
</body>
</html>
保存为hta文件.
标签:
hta,磁盘空间,脚本
圆月山庄资源网 Design By www.vgjia.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
圆月山庄资源网 Design By www.vgjia.com
暂无评论...
更新日志
2024年11月01日
2024年11月01日
- 群星《狐妖小红娘月红篇 电视剧原声带》[320K/MP3][233.61MB]
- 英雄联盟s14四强淘汰赛规则是什么 全球总决赛四强淘汰赛规则详解
- 英雄联盟s14四强赛怎么分组 S14全球总决赛四强赛分组规则详解
- 英雄联盟s14四强赛抽签规则是什么 S14全球总决赛四强抽签规则详解
- ButterQuartet-ScintillaEarlyItalianStringQuartets(DeLuxe)(2024)[24Bit-WAV]
- 草原最美情歌《迷醉女中音》2CD/DTS-ES[WAV]
- 爵士女伶何芸妮《靡靡之音》(香港版)[WAVCUE]
- 游戏中辱骂他人同样侵犯名誉权 一玩家被判道歉
- 老游戏远程共享申请失败 美国版权局拒绝豁免请愿
- 通过本地化支付解决方案,解锁150亿美元拉美和非洲游戏市场
- 群星《狐妖小红娘月红篇 电视剧原声带》[FLAC/分轨][574.68MB]
- 群星《红色冲浪板 电影配乐专辑》[320K/MP3][106.63MB]
- 罗艺恒《What Could've Been》[320K/MP3][50.62MB]
- 于台烟.1989-人间山水【银河唱片】【WAV+CUE】
- 杨克强.1992-特制的面具【恩华声视】【WAV+CUE】