Vbscript VBS错误消息

Vbscript VBS错误消息,vbscript,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"

为什么这个脚本不起作用

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就会关闭

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 

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

VBScript需要换行。是的,我在VBScript中使用了新行,但我在发布它时无法正确设置格式,这是我的错误,我很累。我是VBS和编程的新手,所以我正在尝试一些基本的东西,这就是重点。你的脚本除了在“objShell.Run”shutdown-s-t0-f-m”之后需要一个“\\”,所以看起来像“objectShell.Run”shutdown-s-t0-f-m\\“为什么?没有必要吗?