Tom's Guide | Tom's Hardware | Tom's Games | PC Safety Suite
![]() |
![]() |
![]() |
Comment:
Hej ...
i've asked in "networking" about how to loop a "net send"-mesage.
I got the info, that this will work by doing a batch file ... can you help me how to do sort kind of "batch file" ??
Thx in advance
best rgds
+1 | ![]() |
What do you mean by "to loop a Net Send command"?
Which condition breaks the loop? Please explain clearly what you want to achieve. Here you find a lot of batch scripting gurus, but they can't read your mind.
+1 | ![]() |
I'm sorry..
so see, i want to send a message with "net send" about 30 times !
(A friend afflict me with sending sort kind of massege and so i have to click 30 times on "ok") --- =(Now i want to pay back =)
So can you tell me how to send sort kind of message 30+ times??PS: i've extract from a lot of entries, that this is called loop !
I'm sorry, if this is rubbishthx in advance
+1 | ![]() |
I strongly hope you do not want to use my know-how to hack anybody; keep in mind I can track you and pull you to pay for any harmful design.
So stated, here a sample batch to loop thirty times the message
for /L %%j in (1 1 30) do @Net Send .....
If you want you can just type it at prompt replacing %%j with %j.Use nuclear fuel for power generation, not to design atomic weapons.
+1 | ![]() |
Okee ... this sounds good, but my Problem now .. how du i have to write this ??
for /L %%j in (1 1 30) do @Net Send .....
where do i have to paste the computername etc.
can you write this exactly how i have to paste it, when comp-name is 01234 ??
+1 | ![]() |
for /L %%j in (1 1 30) do @Net Send Computer_Name Message
E.G.: Net Send H-BOMB Beware HOT RUN!You can use ip addres instead of computer name if known and that works on LAN only.
+1 | ![]() |
ok i understand !!
So i just have to copy the scrpits and paste the computername/ip-adress!!
Last Question: If my networks compised just one computer (my own) do it work, when i just put * instead of computername and i'll get my own message ??
Because i want to try the scrips etc. !!Thx in advance
+1 | ![]() |
A network is a system connecting two or more nodes, one computer does not make a LAN, it is a standalone workstation. Any way your computer has its own name even if not connected to a LAN. Type Echo.%computername% to display it. To deliver a message to yourself save the following script as myself.bat
for /L %%j in (1 1 30) do @Net Send %ComputerName% Test MSG
then type myself I don't know however if that does work without a LAN connection. Just try.
+1 | ![]() |
Okee thx
I have a LAN-Connection at Home ^^
It was just for interest !
Thanks for your advice. thanks a lot
+1 | ![]() |
Just for your info, the Net Send command needs the Messenger Service of XP is enabled that is not granted by default. Instead of teaching how to enable it, I suggest you use the following alternate command (mandatory on Vista)
msg /server:ComputerName * Message Text
So if you get an "alias" error message replace Net Send with the above statement that does not require Messenger Service enabled.
![]() |
Look, Julian-Gregorian Da...
|
Batch files: Get value ou...
|

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.