巴中棠湖外语实验学校:如何把电脑定时关机

来源:百度文库 编辑:中科新闻网 时间:2024/04/29 17:20:13

1、
set wshshell = CreateObject("WScript.Shell")
timeout = 6
ask = "系统将在 " & timeout & " 秒钟后将关机!"
title ="自动关机"
constants = vbExclamation + vbOkCancel
result = wshshell.Popup(ask, timeout, title, constants)
if result = vbCancel then
elseif result = true then
Set colOperatingSystems = GetObject("winmgmts:{(shutdown)}").ExecQuery("Select * from Win32_OperatingSystem")
For Each objOperatingSystem in colOperatingSystems
ObjOperatingSystem.Win32Shutdown(8)
Next
end if

2、
CreateObject("WScript.Shell").SendKeys "^{ESC}u{down}{down}{down}{up}{up}~"

挑一个存在vbs就可以了

到百度搜索"定时关机",大把大把的可以下载.

自己会语言就可以自己编一个,不会的就找软件

请问是什么系统!!

迅雷也可