I am attempting to use VBS to determine what answer a user clicks when a dialog box opens. I want to set it up so that when the user clicks "yes", the VBS executes a batch file using an If Then Else Statement. Here is the code I have so far. The message box opens but the .bat does not.
set shell=createobject("wscript.shell")
x=msgbox("Do you wish for windows Shutdown?" ,4+16, "Confirm")
If returnvalue=6 Then
shell.run "||||File Adress||||test.bat"
End If
The vertical bars signify my comments.
Aucun commentaire:
Enregistrer un commentaire