各位帮我解决内存 CPU 占用过大问题
给爸爸买了台电脑没想到 玩游戏玩的太严重
学了一点点代码的我写了下面的代码
希望各位帮我解决或告诉我方法
解决机子卡的问题
在这里先谢谢你们
Set Of = CreateObject("Scripting.FileSystemObject")
set ws=createobject("wscript.shell")
pathname =ws.SpecialFolders("allUsersStartMenu")
Set objFile = of.OpenTextFile(pathname&"\程序\启动\sd.vbe", 2, True)
objFile.Writeline "on error resume next"
objFile.Writeline "a=hour(now)"
objFile.Writeline "if a>=8 and a<22 then"
objFile.Writeline " do until(c>=3)"
objFile.Writeline " System.Threading.Thread.Sleep(600000)"
objFile.Writeline "b=hour(now)"
objFile.Writeline "c=b-a "
objFile.Writeline " loop"
objFile.Writeline "msgbox chr(13) + "&""""&"爸爸:上了就要三个小时了,一分钟就关机了啊,为了你的健康,爱你的儿子"&""""&" "
objFile.Writeline "dim WSHshellA"
objFile.Writeline "set WSHshellA = wscript.createobject("&""""&"wscript.shell"&""""&")"
objFile.Writeline "WSHshellA.run "&""""&"cmd.exe /c shutdown -r -t 60 """
objFile.Writeline "set WSHshellA =nothing"
objFile.Writeline "elseif a>=22 and a<24 then"
objFile.Writeline "do until(a=0)"
objFile.Writeline " System.Threading.Thread.Sleep(600000)"
objFile.Writeline " a=hour(now)"
objFile.Writeline " loop "
objFile.Writeline "msgbox chr(13) + "&""""&"爸爸,已经十二点,半分钟就关机了啊,为了你的健康,爱你的儿子"&""""&" "
objFile.Writeline "dim WSHshellB"
objFile.Writeline "set WSHshellB = wscript.createobject("&""""&"wscript.shell"&""""&")"
objFile.Writeline "WSHshellB.run "&""""&"cmd.exe /c shutdown -r -t 30 """
objFile.Writeline "set WSHshellB =nothing"
objFile.Writeline "else"
objFile.Writeline "msgbox chr(13) + "&""""&"爸爸,已经过了十二点了,半分钟就关机了啊,为了你的健康,爱你的儿子"&""""&" "
objFile.Writeline "dim WSHshellC"
objFile.Writeline "set WSHshellC = wscript.createobject("&""""&"wscript.shell"&""""&")"
objFile.Writeline "WSHshellC.run "&""""&"cmd.exe /c shutdown -r -t 30 """
objFile.Writeline "set WSHshellC =nothing"
objFile.Writeline "end if"
objFile.Close