Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
I wish to send messageboxes to other ppl on my network using vbscript... I don't know any commands so walk me through the syntaxes... thx

Is there any reason why you don't want to use the net send command?
How do you know when a politician is lying? His mouth is moving.

> Curt R
I am sorry but I don't have garbage-loads of time to learn vbscript when I run a massive cybercafe... I never went to school for computers and learned practically everything I do know on google and hands on experience. Enough of the ranting though, either you help me or you go post somewhere else, because you are no help, thanks.and GUAPO thank you for your information but I need a command more versatile then Net send. Besides, I blocked all the basic and net commands so nobody could mess around with my pc's. If there is a way to do it in vbscript, I would like to know it. thank you.

I am sorry Curt R. but people who are not willing to help should not say anything at all. Just because I need a quick way to do this does not mean I am lazy (although most are). I just do not have the kind of time to learn the language when I only need it this one time. That is a waste of resources. I do not mean to be rude or anything that is just my opinion.

> Curt R
I am sorry but I don't have garbage-loads of time to learn vbscript when I run a massive cybercafeI'm sorry too, most of us are employed and have lives outside of work that include family, friends, travel etc and therefore don't have gobs of time to help people who run "massive cybercafe's" do things they could learn to do for themselves.
What makes you think anybody here who has spent the time learning vbscript wants to do the work for you? Most, if not all of us, would be willing to consult, for a fee, and do your work for you. While we are here to help, we're not normally of the mindset where we'll give away our bread and butter for free just because some rude, lazy horses behind askes us to. No more than you'd give us free coffee, donuts and internet in your "massive cybercafe" just because we walked in and asked for it.

This seems to be going nowhere... I am sorry I even asked for help... It WILL be easier to learn the whole flippin' language then ask you guys. Either way I was asking for vbscript alone, nothing else, no apps, no DOS commands. I needed vbscript. OH well... I wanted to learn the language anyway... Thanks for whatever help you all did give me, and sorry to those I may have offended with my short temper :)

Hmmmm.....
Well, I confess to a certain amount of short temperedness myself......and since you've been kind enough to offer your thanks anyhow, I'll ask you to please excuse me mine and I will try to help you as much as I can considering I don't know VB myself.
Do keep in mind that it often happens people come in here thinking they have to do something one particular way and frequently we know of other, often easier, ways to do this and like in this instance, will offer that as an alternative.
I want to point out that at the outset guapo mentioned using the net send command to you. This is a viable option. It can be invoked from a batchfile if need be (for purposes of automation) as well as from the command line, and is likely what a vbscript would use anyway.
I suspect in part, that's why guapo mentioned it. It would provide you with a workable alternative to learning VB. If you wish to invoke it with a mouseclick, you might need to write a batchfile that asks for input (username to send msg to, or, send to everyone + the message to send) but that's probably simpler than writing a VB script or at the very least, I know of one fellow who hangs out on here that is the best batchfile writer I know and I'm positive he would be happy to help you write a batchfile to do what you need it to do.
If you do decide to pursue the net send command and it does require you to write a batchfile and you need help with that, the fellow you'll want to ask for help is Mechanix2Go

Something like this,
sub runnetsend()
dim compname
dim strmessage
Set wshshell = WScript.CreateObject ("WScript.shell")
wshshell.Run "net send " & compname & " " & strmessageend sub
might want to add an inputbox to take the inupt.

thanks guys, I shouldn't need help from here as I have written batch files before... I guess I will just unblock my own computer from using the net send command if that is possible and do it that way. We will see if it works...
thanks to andynet for the vbs syntaxes and to curt for forwarding me to Mechanix2Go. I may contact him if this does not work...

does this look right? how will i know if it is even working?
Dim objShell, strComputer, strInput, strmessage
Do
strComputer = (InputBox(" ComputerName to send meesage to", "Net send"))
If strComputer <> "" Then
strInput = True
End if
Loop until strInput = TrueDo
strmessage = (InputBox("input meesage to send:", "Net send"))
If strmessage <> "" Then
strInput = True
End if
Loop until strInput = Truesub runnetsend()
Set wshshell = WScript.CreateObject ("WScript.shell")
wshshell.Run "net send " & strComputer & " " & strmessageend sub

Yeah you could do that you would then need to call the actual net send command so remove the,
"sub runnetsend() " and "end sub" so,
Dim objShell, strComputer, strInput, strmessage
Do
strComputer = (InputBox(" ComputerName to send meesage to", "Net send"))
If strComputer <> "" Then
strInput = True
End if
Loop until strInput = TrueDo
strmessage = (InputBox("input meesage to send:", "Net send"))
If strmessage <> "" Then
strInput = True
End if
Loop until strInput = TrueSet wshshell = WScript.CreateObject ("WScript.shell")
wshshell.Run "net send " & strComputer & " " & strmessage
What about writing it in say VB6, or i believe there is a free version of VB express available. It would give you a better GUI to work with and hence you could add computer names, ips etc.. here you go,.http://www.microsoft.com/Express/VB/
The code is pretty much the same as for vbscrpt, if you need a hand with this just keep the thread going.
Test it on your self (loopback) just add your full comp name and a message and you should see the messagebox pop up on your own desktop, it worked for me.

It seems to give me the following error if I do it manually:
2273 > An error ocurred while sending a message to alex-pc.
the message alias could not be found on the network.the program seems to be working like it should but this is an interesting error... if i send a message to myself will it pass through my router and/or firewall? and therefore block the command?

![]() |
don't know what to NAS ge...
|
unable to get to w/2003 f...
|

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