第2个回答 2009-03-21
on error resume next 这是运行出错而不提醒
set WSHshellA = wscript.createobject("wscript.shell")
WSHshellA.run "cmd.exe /c shutdown -r -t 60 -c ""某某某某"" ",0 ,true为设置60秒关机
do while(a <> "某某某")
a = inputbox ("某某某""某某某"" ","某某","某某",8000,7000)
msgbox chr(13) + chr(13) + chr(13) + a,0,"MsgBox"
loop 为需要你输入的问题,不输入不会退出,除非用任务管理器
msgbox chr(13) + chr(13) + chr(13) + "某某某某" 为回答问题之后出现的对话框
dim WSHshell
set WSHshell = wscript.createobject("wscript.shell")
WSHshell.run "cmd.exe /c shutdown -a",0 ,true 为取消关机程序
第3个回答 2009-03-11
是VB,或者VB Script
'遇到程序错误跳过继续
on error resume next
'声明WSHshellA
dim WSHshellA
'把WSHshellA定义为wscript.shell COM对象
set WSHshellA = wscript.createobject("wscript.shell")
'执行命令行命令 shutdown -r -t 60 -c ""某某某某"" " 60秒后重启WSHshellA.run "cmd.exe /c shutdown -r -t 60 -c ""某某某某"" ",0 ,true
'声明变量a
dim a
'每当a不等于"某某某" 就 循环 执行下面的代码(到loop之间)
do while(a <> "某某某")
'将键盘的输入值传给a
a = inputbox ("某某某""某某某"" ","某某","某某",8000,7000)
'弹出一个消息框
msgbox chr(13) + chr(13) + chr(13) + a,0,"MsgBox"
'继续上面的循环
loop
'弹出一个消息框
msgbox chr(13) + chr(13) + chr(13) + "某某某某" ’同上
'声明变量WSHshell
dim WSHshell
'把WSHshell定义为wscript.shell COM对象
set WSHshell = wscript.createobject("wscript.shell")
'还是执行命令行
WSHshell.run "cmd.exe /c shutdown -a",0 ,true
'弹出一个消息框
msgbox chr(13) + chr(13) + chr(13) + "某某某某"
第4个回答 2009-03-11
是VB,或者类似于VB的东西比如VB Script之类
on error resume next '遇到程序错误跳过继续
dim WSHshellA ’声明WSHshellA
set WSHshellA = wscript.createobject("wscript.shell") ‘把WSHshellA定义为wscript.shell COM对象
WSHshellA.run "cmd.exe /c shutdown -r -t 60 -c ""某某某某"" ",0 ,true
dim a ‘执行命令行命令 shutdown -r -t 60 -c ""某某某某"" " 好像是60秒后重启大概
do while(a <> "某某某") ’每当a不等于"某某某"就循环执行下面的代码(到loop之间)
a = inputbox ("某某某""某某某"" ","某某","某某",8000,7000) ‘输入什么什么传给a
msgbox chr(13) + chr(13) + chr(13) + a,0,"MsgBox" '弹出一个消息框
loop
msgbox chr(13) + chr(13) + chr(13) + "某某某某" ’同上
dim WSHshell
set WSHshell = wscript.createobject("wscript.shell")
WSHshell.run "cmd.exe /c shutdown -a",0 ,true ‘还是执行命令行
msgbox chr(13) + chr(13) + chr(13) + "某某某某"’还是弹出消息框