精品丰满熟女一区二区三区_五月天亚洲欧美综合网_亚洲青青青在线观看_国产一区二区精选

  • <menu id="29e66"></menu>

    <bdo id="29e66"><mark id="29e66"><legend id="29e66"></legend></mark></bdo>

  • <pre id="29e66"><tt id="29e66"><rt id="29e66"></rt></tt></pre>

      <label id="29e66"></label><address id="29e66"><mark id="29e66"><strike id="29e66"></strike></mark></address>
      學(xué)習(xí)啦 > 學(xué)習(xí)電腦 > 電腦故障 > 電腦故障現(xiàn)象 > 自動關(guān)機(jī) >

      可以定時自動關(guān)機(jī)的vbs腳本

      時間: 加城1195 分享

        我們都知道設(shè)置定時關(guān)機(jī)方法有多種,包括系統(tǒng)命令,借助軟件,bat腳本等等,此外還可以利用vbs腳本命令實(shí)現(xiàn),可能比較復(fù)雜,但還是挺有趣的,下面一起看看完整代碼!

        vbs腳本代碼

        Dim mytime,myout1,myout2

        mytime=null

        mytime=InputBox("請輸入定時時間(格式20:10:05)"&vblf&"如果想倒計(jì)時關(guān)機(jī),請輸入倒計(jì)時時間"&vblf&"(單位/分鐘)"&vblf&"輸入‘xxx'可以馬上關(guān)機(jī)"&vblf&"退出點(diǎn)‘取消'","定時關(guān)機(jī)","1")

        Set wshshell=wscript.createobject("wscript.shell")

        If IsNumeric(mytime)=False Then

        If IsDate(mytime)=True Then

        wshshell.run "at "&mytime&" shutdown -s" '定時關(guān)機(jī)在任務(wù)列表中

        myout1=MsgBox("定時成功!電腦將在"&mytime&"關(guān)機(jī)!放棄關(guān)機(jī)請點(diǎn)‘取消'!",vbokcancel,"定時關(guān)機(jī)")

        If myout1=vbcancel Then

        wshshell.run "at /delete /y"

        MsgBox "關(guān)機(jī)已取消!",64,"定時關(guān)機(jī)"

        End If

        Else

        If mytime="xxx" Then

        wshshell.run "shutdown -s -t 0"

        End If

        MsgBox "輸入錯誤!請重新輸入!",64,"定時關(guān)機(jī)"

        End If

        Else

        If mytime>600 Or mytime<=0 Then

        MsgBox "輸入錯誤!倒計(jì)時不能多于10小時(600分鐘)!",64,"定時關(guān)機(jī)"

        wscript.quit

        End If

        wshshell.run "shutdown -s -t "&mytime*60

        myout2=MsgBox("設(shè)置成功!電腦將在"&mytime&"分鐘后關(guān)機(jī)!放棄關(guān)機(jī)請點(diǎn)‘取消'!",vbokcancel,"定時關(guān)機(jī)")

        If myout2=vbcancel Then

        wshshell.run "shutdown -a"

        MsgBox "關(guān)機(jī)已取消!",64,"定時關(guān)機(jī)"

        End If

        End If

        補(bǔ)充:電腦關(guān)機(jī)的常用方法

        第一種方式:通過點(diǎn)擊電腦的開始菜單并選擇關(guān)機(jī)

        第二種方法:通過快捷命令alt+F4組合鍵進(jìn)行關(guān)機(jī),在彈出窗口中選擇關(guān)機(jī)并確定

        第三種方法:通過ctrl+alt+delete組合鍵打開任務(wù)管理器

        通過選擇用戶選項(xiàng)點(diǎn)擊活動的賬戶,并選擇斷開或者注銷

        第四種方法:通過電腦運(yùn)行(快捷命令為ctrl+R)輸入cmd進(jìn)入到管理員界面,通過輸入shuntdown /p進(jìn)行關(guān)機(jī)

        第五種方法:直接按住電腦開機(jī)鍵數(shù)秒,直到電腦主機(jī)停止運(yùn)行為止,此方法為不得已才會使用,或者直接切斷電源。

        相關(guān)閱讀:為什么電腦總是自動關(guān)機(jī)

        這種情況,一般由于以下原因造成的:

        1.電腦系統(tǒng)中毒或中了惡意軟件。

        2.cpu 風(fēng)扇壞導(dǎo)致cpu溫度過高,過熱保護(hù)。

        3.電源壞,或添加了新硬件,電源供電不足。

        4.顯卡或顯卡風(fēng)扇壞。

        5.主板壞,主板芯過熱。


      定時自動關(guān)機(jī)相關(guān)文章:

      1.電腦Win10設(shè)置定時自動關(guān)機(jī)的兩種方法

      2.怎么設(shè)置時間讓電腦自動關(guān)機(jī)

      3.WIN10怎么設(shè)置定時自動關(guān)機(jī)

      4.電腦怎么樣使用360設(shè)置定時自動關(guān)機(jī)

      5.如何用cmd代碼設(shè)置強(qiáng)制自動關(guān)機(jī)

      4021320