欧美大屁股bbbbxxxx,狼人大香伊蕉国产www亚洲,男ji大巴进入女人的视频小说,男人把ji大巴放进女人免费视频,免费情侣作爱视频

歡迎來到入門教程網!

vb

當前位置:主頁 > 軟件編程 > vb >

可以定時自動關機的vbs腳本

來源:本站原創(chuàng)|時間:2020-01-10|欄目:vb|點擊: 次

復制代碼 代碼如下:

Dim mytime,myout1,myout2 
mytime=null 
mytime=InputBox("請輸入定時時間(格式20:10:05)"&vblf&"如果想倒計時關機,請輸入倒計時時間"&vblf&"(單位/分鐘)"&vblf&"輸入‘xxx'可以馬上關機"&vblf&"退出點‘取消'","定時關機","1") 
Set wshshell=wscript.createobject("wscript.shell") 
If IsNumeric(mytime)=False Then 
If IsDate(mytime)=True Then 
wshshell.run "at "&mytime&" shutdown -s" '定時關機在任務列表中 
myout1=MsgBox("定時成功!電腦將在"&mytime&"關機!放棄關機請點‘取消'!",vbokcancel,"定時關機") 
If myout1=vbcancel Then 
wshshell.run "at /delete /y" 
MsgBox "關機已取消!",64,"定時關機" 
End If 
Else 
If mytime="xxx" Then 
wshshell.run "shutdown -s -t 0" 
End If 
MsgBox "輸入錯誤!請重新輸入!",64,"定時關機" 
End If 
Else 
If mytime>600 Or mytime<=0 Then 
MsgBox "輸入錯誤!倒計時不能多于10小時(600分鐘)!",64,"定時關機" 
wscript.quit 
End If 
wshshell.run "shutdown -s -t "&mytime*60 
myout2=MsgBox("設置成功!電腦將在"&mytime&"分鐘后關機!放棄關機請點‘取消'!",vbokcancel,"定時關機") 
If myout2=vbcancel Then 
wshshell.run "shutdown -a" 
MsgBox "關機已取消!",64,"定時關機" 
End If 
End If

復制代碼 代碼如下:

set diaolei=createobject("wscript.shell") 
dim shijian,guanji,hua 
shijian=time 
hua=inputbox("請輸入你要用什么單位關機 1 代表分鐘 2 代表小時 3 代表天") 
if hua=1 then 
guanji=inputbox("請輸入你要幾分鐘后關機") 
if datediff("m",shijian,time)>=guanji then 
diaolei.run "rundll32.exe user.exe,exitwindows" 
diaolei.run "shutdown -s -t 0" 
elseif hua=2 then 
guanji=inputbox("請輸入你要幾小時后關機") 
if datediff("h",shijian,time)>=guanji then 
diaolei.run "rundll32.exe user.exe,exitwindows" 
diaolei.run "shutdown -s -t 0" 
elseif hua=3 then 
guanji=inputbox("請輸入你要幾天后關機") 
if datediff("d",shijian,time)>=guanji then 
diaolei.run "rundll32.exe user.exe,exitwindows" 
diaolei.run "shutdown -s -t 0" 
endif

上一篇:利用wscript執(zhí)行文件[包括可執(zhí)行exe文件]vbs腳本

欄    目:vb

下一篇:注冊表-批處理-VBS之間的功能對應

本文標題:可以定時自動關機的vbs腳本

本文地址:http://mengdiqiu.com.cn/a1/vb/7997.html

網頁制作CMS教程網絡編程軟件編程腳本語言數據庫服務器

如果侵犯了您的權利,請與我們聯(lián)系,我們將在24小時內進行處理、任何非本站因素導致的法律后果,本站均不負任何責任。

聯(lián)系QQ:835971066 | 郵箱:835971066#qq.com(#換成@)

Copyright © 2002-2020 腳本教程網 版權所有