[VBS]自动关机脚本

      编程资料 2004-12-20 20:21
自动关机脚本:将以下代码保存为VBS文件

Set myobject=wscript.createobject("wscript.network")
Set myshell=wscript.createobject("wscript.shell")
Name=trim(myobject.username)
Dim curhour
Dim abc
if name="用户名" then
Curhour=hour(time)
Aa=curhour
Do
Cuhour-hour(time)
Loop until curhour>=abc+2
if curhour<=22 then
Myshell.run "shutdown -s -t 300 -c ×××,你已经连续玩了两个小时,得休息一会! -f"
Else
Myshell.run "shutdown -s -t 300 -c ×××,现在已经22点,赶紧关机睡觉! -f"
End if
End if
标签集:TAGS:
回复Comments() 点击Count()

回复Comments

{commentauthor}
{commentauthor}
{commenttime}
{commentnum}
{commentcontent}
作者:
{commentrecontent}