| 1. |
Solve : Sending string to multiple users...? |
|
Answer» I want to create a VARIABLE that is a string, like "Hello", and send to multiple users using net send. I can use net send, but cannot create a variable to be sent. I am just trying to avoid updating each net send statment when the message changes. variable = "Hello" I believe previous posts mentioned that you have to set the variable. Both the SET command and the NET SEND must be done in the same window. Code: [Select]set variable = "Hello" net send computername %variable% GuruGary's solution still applies. 8-)Sorry, I mistyped. I've been doing exactly that. I have these two lines in a file called send.bat: set variable "Hello" net send AA54546 %variable% Can anyone reproduce this using either network Id or computer name successfully?I was able to get your send.bat file to work without any problems. Used a different computername of course. What OS and type of network are you using? 8-) It's highly recommended to disable the Messenger Service as this can be the source of UNWANTED popups from the script kiddies.I'm actually using my Windows (2000) network login, not computer name. I will try it with the computer name instead. Not sure of the network type.Be sure there is an EQUALS sign (=) between the variable and Hello. The line should be exactly like this: Code: [Select]set variable="Good Morning" If that still does not work, then put an "echo" at the beginning of the first line so we can see the output, and then post the results. EXAMPLE, change your batch file from: Code: [Select]@echo off set variable="Good Morning" net send AA56697 %variable%to Code: [Select]@echo off set variable="Good Morning" echo net send AA56697 %variable% |
|