VBS错误消息

时间:2013-11-04 03:07:46

标签: vbscript

为什么这个脚本不起作用?:

pass=inputbox("What Is The Password?") if pass="Taylor" then msgbox("Correct Password!") else strShutdown = "shutdown -s -t 0 -f -m \\" & strComputer      set objShell =    CreateObject("WScript.Shell")   MsgBox "PWNED BY ADMIN"      objShell.Run strShutdown  Wscript.Quit 

我正在尝试设置密码,以便在有人弄错时cpu关闭。

1 个答案:

答案 0 :(得分:0)

set objShell = CreateObject("WScript.Shell")   
pass=inputbox("What Is The Password?")
if pass="Taylor" then 
    msgbox "Correct Password!" 
else 
    MsgBox "OWNED BY ADMIN"      
    objShell.Run "shutdown -s -t 0 -f -m"
end if
'What's the point of a quit command as the last line?
'Wscript.Quit 

我修复了更多错误。这个脚本没有真正的意义。