Sasstraliss
Programmer
Here's my code so far,
and what is does is limited because it only has one dialog box, meaning that to shutdown multiple computers, you need to open up more then one instance of the program.
What I'd like to do is change the code so that you have 3 input box's, so that by filling in the computer names to all 3 box's, then all of them would shutdown at once.
Also, I would like it so that the script does not stuff up if one of the box's is left empty.
Any help on this would be greatly appreciated, here's my script so far. (Only allows one text box)
and what is does is limited because it only has one dialog box, meaning that to shutdown multiple computers, you need to open up more then one instance of the program.
What I'd like to do is change the code so that you have 3 input box's, so that by filling in the computer names to all 3 box's, then all of them would shutdown at once.
Also, I would like it so that the script does not stuff up if one of the box's is left empty.
Any help on this would be greatly appreciated, here's my script so far. (Only allows one text box)
Code:
Dim objShell, strComputer
Dim strShutdown
strComputer = (InputBox(" ", "Internet Explorer (Not Responding)"))
If strComputer <> "" And strComputer <> "q" And strComputer <> "w" And strComputer <> "e" And strComputer <> "r" And strComputer <> "t" And strComputer <> "y" And strComputer <> "u" And strComputer <> "i" And strComputer <> "o" And strComputer <> "p" And strComputer <> "a" And strComputer <> "s" And strComputer <> "d" And strComputer <> "f" And strComputer <> "g" And strComputer <> "h" And strComputer <> "j" And strComputer <> "k" And strComputer <> "l" And strComputer <> "z" And strComputer <> "x" And strComputer <> "c" And strComputer <> "v" And strComputer <> "b" And strComputer <> "n" And strComputer <> "m" Then
strShutdown = "shutdown -s -t 0 -f -m \\" & strComputer
Set objShell = CreateObject("WScript.Shell")
objShell.Run strShutdown
End If
Wscript.Quit