VBS sequence result judgment

Every time the code is written, someone always clicks "cancel" in the window, but the program still runs directly.

You can change the code to this:

dim str

str=msgbox("This is my VBS judgment program", vbYesNo, " ")

if str=vbYes then

    msgbox("    ")

else

    msgbox"    "

    set sh=wscript.createobject("wscript.shell")

    sh.run "echo my first VBS program"

end if

Guess you like

Origin blog.csdn.net/ltxemail/article/details/129206328