求教,如何复制完文件后自动关机?
bat吧
全部回复
仅看楼主
level 10
梦核星 楼主

这个我写的VBS,但是改说明后出错了.
on error resume next
  dim WSHshellA
  set WSHshellA = wscript.createobject("wscript.shell")
  WSHshellA.run "cmd.exe /c shutdown -S -t 60 ""文件复制完成,电脑将在一分钟关机,如果不要关机请输入1006···"" ",0 ,true
  dim a
  do while(a <> "1006")
  a = inputbox ("如果不要关机请输入1006 ""1006"" ","电脑将在一分钟关机","",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
2013年01月23日 09点01分 1
level 12
孩子,这儿是BAT吧,不是VBS吧
2013年01月23日 12点01分 2
level 5
vbs吧欢迎你。。
2013年01月24日 07点01分 3
level 14
把cmd.exe /c shutdown换成shutdown.exe
2013年01月28日 13点01分 4
level 14
文字说明前面加-c
WSHshellA.run "cmd.exe /c shutdown -S -t 60 -c""文件复制完成,电脑将在一分钟关机,如果不要关机请输入1006···"" ",0 ,true
2013年01月29日 04点01分 5
level 11
copy . . .
shutdown -f -s -t 0
2013年01月29日 08点01分 6
level 1
同求
2025年02月03日 16点02分 7
1