国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > VBScript > 正文

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

2019-10-26 17:58:05
字體:
來源:轉載
供稿:網友
復制代碼 代碼如下:

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

您可能感興趣的文章:

自己寫的一個定時關機或重啟的vbs腳本vbs實現的定時關機、重啟的腳本和程序vbs實現的eMule電驢自動關機腳本代碼VBS 斷網后自動關機30秒后Crack8 VBS整人腳本 你不說你愛我 就關機VBS中獲取系統本次及上次開關機時間的代碼(WinXP/win2003/Win7兼容版)vb下的惡搞關機程序VB關機惡搞小程序
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表

圖片精選

主站蜘蛛池模板: 碌曲县| 五莲县| 营口市| 五常市| 潢川县| 黄浦区| 靖江市| 铅山县| 砀山县| 朔州市| 华阴市| 施甸县| 当阳市| 屯留县| 博罗县| 牡丹江市| 连江县| 炉霍县| 平罗县| 大洼县| 锡林郭勒盟| 山东省| 上饶市| 虎林市| 东乡族自治县| 于都县| 济南市| 临潭县| 高州市| 临安市| 张北县| 旬邑县| 建德市| 沁阳市| 神木县| 乌拉特前旗| 攀枝花市| 呈贡县| 甘孜县| 通辽市| 易门县|