|I've created a user interface in VBScript that compliments the NET SEND command in Windows XP. It allows the user to input any number of computer names seperated by a comma (,), then input the message that they want to send. Finally, It displays a summary of what message was sent and the computer names.|
This thing is that I'd like for it to display all the computer names on the same message box. The way I have it now, it displays each PC in it's own popup box.
How can I modify my script to display a list of all the PCs that got the message using the msgbox function?
intSize = 0
Set objShell = Wscript.CreateObject("WScript.Shell")
'Get computer names
PC2Reach = InputBox("Please enter the computer name. For additional computers, separate each with a comma (,)"
Message2Send = InputBox("Type your message.", "Send a message")
arrStations = Split(PC2Reach, ",")
For Each PC2Reach In arrStations
objShell.Run "net send " & PC2Reach & " " & Message2Send
ReDim Preserve arrPCnames(intSize)
arrPCnames(intSize) = PC2Reach
intSize = intSize + 1
'Summary of command
MsgBox "Here's you message:" & vbCrLf & _
vbCrLf & _
Message2Send & vbCrLf & _
vbCrLf & _
"Computers that got the message:"
For Each strName in arrPCNames