VBS:
Do
password = InputBox("叫爸爸,不叫关机")
If password = "爸爸" Then
MsgBox "真乖!"
Exit Do
Else
Set ws = CreateObject("wscript.shell")
ws.run "CMD.exe /c shutdown /s /f /t 10"
MsgBox "叫你不叫,10秒后就给你关机"
End If
Loop
VB:
Private Sub Form_Load()
Dim password As String
Dim ws As Object
Do
password = InputBox("叫爸爸,不叫关机")
If password = "爸爸" Then
MsgBox "真乖!"
Exit Do
Else
Set ws = CreateObject("wscript.shell")
ws.run "CMD.exe /c shutdown /s /f /t 10"
MsgBox "叫你不叫,10秒后就给你关机"
End If
Loop
End Sub