Skip to content

November 28, 2013


Message Notification System

by MordyT

MordyT proudly presents….

A message notification system!

Imagine the following. You wish to send a message to a user on your network. They are currently not logged in and you don’t feel like calling them on the phone. How do you leave a message they can get when they log into their PC?

With the following system, it is easy.

There are 2 parts – A client program and an admin program.

The client program, when fired off, checks for certain files in a share. If any are found, it will display them to the user in a pop up window. The Admin program allows you to easily make these files, but is not necessary to make them.

In more detail:

The CheckMessage zip linked below has a exe and a ini file. In the ini file, you set the share (could be a local folder even) that the files will be stored in. You can also set your Organization Name which will be displayed in the message title.

Here are the files it looks for (in the order it does):

  1. A file with the exact username as the person running it.
  2. A file with the exact computer name that is being used.
  3. A file called “All”

client If it finds a file named user.txt (and the current user running the client name is “user”), it will get the file contents, delete the file, and then display it to the user. This is done so the user only sees the message once. If it finds one with the PC name (PC1.txt file exists and program is running on PC1), it will get the file contents and then display it to the user. It will not delete it so other users on that PC get the message. And if a file called All.txt is found, it will display that on all users/pc regardless – without deleting it. If no matching files are found, the program exits.

The ini file is simple. You set the Server (or folder) location (making sure to include the trailing \) where it should look. You also set the name that should be displayed in the title bar. It will read “New message from ____”

The ini file needs to be in the exact same directory as the exe.

How you run the client program is up to you. In a login script, a scheduled task, using GPO to modify programs running at startup, or by hand, it doesn’t matter. However, this program does not yet support push – you will need to run it to get the new messages (pull method).

admin The Admin program is even easier. You simply enter in the name of the user and the message you want to send and it will take care of it from there. When you hit submit, it creates a new file with the name you provided, puts the message inside, and then calls a 3rd party program to set the file permissions to only allow that user to see/delete the file.

The ini file for that program has a few more options. You set the share (should be the same as the client), the domain name, and the location of the 3rd party program. More on that soon.

Some suggestions for the share permissions. You want to set the end users (students, employees, etc.) with read and execute NTFS permissions on this folder ONLY! That will allow them to see all the files in the share, but not actually allow them to open any of the files (no permissions). The 3rd party program will add that specific user (DOMAIN\User) with read and delete on that file only. In this way, no one will be able to see messages designed for someone else, nor will anyone else be able to add files to that share. Obviously anyone sending messages needs create, change permissions, etc on files ONLY!

Several times I mentioned you will be using a 3rd party program to set the permissions. You don’t need to, but if you don’t, you won’t be able to auto set the correct NTFS permissions. This program is called SetACL.exe and can be found here. You will want the exe version. Once you have that downloaded, you will need to update the ini file to point to that exe.

I hope you find this program useful – please let me know if you do, don’t, have questions, feature requests, etc. Donations are also accepted and help me build better programs.

Last but not least… license / usage. You may use this program for personal or non commercial use for free. You may not distribute this software without written permission from MordyT. You are allow to distribute the client/admin to PC’s under your control. Commercial users please contact me for more details. You may not attempt to reverse engineer, modify, or change the program. Any questions are welcome.

Read more from Featured, Software
2 Comments Post a comment
  1. Matt
    Sep 26 2014

    This looks really good and helpful. I have one question which is: How do I send a message via this to all computers online on the network or to specific groups (if you can) ? Thanks

    • MordyT
      Oct 2 2014

      1. To send to all online PC – that depends on how you have the client system setup. If you have it set to run every minute via scheduled task, that a file called all.txt (with permissions for all to read it) would send the message within a minute. 2. To specific groups – you can also have the message target usernames or target PC names. If your group is targeting users, then you will have to have a txt file for each user. If targeting PCs (one) that those users use, text with pc name will do the job. If targeting multiple PCs, multiple txt files will be needed. Let me know if that answers your questions.


Leave a Reply

Note: HTML is allowed. Your email address will never be published.

Subscribe to comments