Sending Network Message to List o Users

HAAAK

Member
Joined
Sep 19, 2006
Messages
7
Programming Experience
1-3
Hi,
Guys, I need help to code this. I have a list of users on the network they use a fixed IP and computer name. What I want is at 7:00 am and 3:00 pm for example they get a newtork message with one button "Ok".
This shouldbe done automatically.

My real problem is to send this network message.

How do i do that? Please give me code sample if you will help.

Thanks,
 
Hi HAAAK,

Try this code, but it requires that the target computer can run Messanger Services and its status is Started. It might be the easiest code because it just uses shell function to execute command.

VB.NET:
Private Sub btnOK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
 
Dim i As Integer
 
If Now.ToShortTimeString = "7:00 AM" Then
For i = 0 To ListBox1.Items.Count - 1
Shell("net send " & ListBox1.Items(i) & " Good morning.")
Next
End If
 
If Now.ToShortTimeString = "3:00 PM" Then
For i = 0 To ListBox1.Items.Count - 1
Shell("net send " & ListBox1.Items(i) & " Please take a rest a moment.")
Next
End If
 
End Sub
Any other better coding should be good (using System.Net namespace or socket?). Please advice...
 
Last edited by a moderator:
Thanks Inhua ,
but as you said: "........ the target computer can run Messanger Services and its status is Started..."

I am looking for a message to be sent by force. In fact, I have developed online Time Sheet system where a user log in and logout to register his time using ASP.NET page he open every morning or afternoon. The users are distributed in many deifferent location in the regions!

The problem that some users forge to register at the morning or when leaving afternoon. That is why I need every user to recieve a reminder with a popup box through the network.

I rememeber there was a DOS command that send a message to a computer using its name or IP.

I wish this will clarify why I need this code. Unless you guys may help me with better way to remind the user.

Thanks,
HAAAK
 
Hi HAAAK,

What do you mean by "by force"? The feature that you are developing on your application just can only run if the configuration of target computer allows it to run. E.g. if the target computer is not a Windows OS, then there must be a service (like Messanger Services on Windows platform) that must run to respon to the "net send" command.

I think there is another way to develop this kind of application without the participation of Messanger Service (event it runs on an ASP.NET web app). The application should utilize the default-common configuration of the target computer so there will not additional overhead to set and maintain its state.

Thanks,
Inhua
 
Dear Inhua,
Yes.. I got you now.. if I am going to run any .NET Windows Form or command with a popup message, that means the target computers should have a sort of configuration or atleast .NET framework installed there.

But I am trying to solve a specific problem. However, in the company I work for all users are connected to the network and using Windows XP Proffessional. Every user has his own uniqe IP and compuater name. I started developing Windows Form to Check (in/out). But this means that all computers should have .NET Framework installed on it. That is why I changed the idea and developed ASP.NET application that can be accessed by any computer in the network through the Intranet.

One of the problem as I said, that some users forget to check (in/out). I am looking for a way to remind them to do so. Otherwise, I made a procedure that won't him to check in on another day before he check out.

So, my queston again, how to remind users with a kind of message at certain time without installing something on there computers. (Note: all computers are joined to one GROUP).

Any other idea?

Thanks,

HAAAK
 
Hi HAAAK,

I have tested my previous code with ASP.NET and it run well. The Shell function calls the net send command which results in poping a message up on the screen of target computer. Just, it needs the Messenger Service (or WinPopUp on Win9x machines) to run on the target computer, which adds additional administrative overheads from the perspective of application developers. They will depend on such thing that is administered by the other folks: network admins. To be worst, some users with administrative rights can disable the service! It is not a good idea. So, the "net send" solution is not good as well.

Another way is to find out whether your network admins implement Windows domain (NT/2000/2003) using Active Directory. If they do, they have a quick and easy method to accomplish your mission: using user login and logon scripts. They can set them using the Group Policy Object while the scripts are made using Visual Basic Script. So straightforward.

Anyway, I am interested about this topic, too, and still wonder if there is another method to do this well.

Thank's,
Inhua
 
Hello Inhua,
Our domain is using Windows (200/2003) server and i know IT people or network administrator can do this script easily. But to share with you the idea, I started thinking to Check (in/out) the employees once they log in or logoff to the network using a startup script. But this will require a coordination with IT department and they may approve or not, and if they will, that means they will put their nose on my project :)

So, I develeped ASP.NET appicatin as a third part application that can be run based on user request of a page. So, If I am going to use IT Department help, then they ill get involved in this project.

That is why I am still looking for a method or a way to do this reminder with out thier interfer. This should be using a "Timer" that is keep running on a server or so to send these messages.

Regards,
 
Back
Top