Travis Horn
Travis Horn

Travis Horn

Windows XP Startup and Shutdown Notifications

Windows XP Startup and Shutdown Notifications

Travis Horn's photo
Travis Horn

Published on Jul 26, 2016

2 min read

This post is part of a project to move my old reference material to my blog. Before 2012, when I accessed the same pieces of code or general information multiple times, I would write a quick HTML page for my own reference and put it on a personal site. Later, I published these pages online. Some of the pages still get used and now I want to make them available on my blog.

Photo by [Tim Gouw](https://cdn.hashnode.com/res/hashnode/image/upload/v1627409987450/Hj0V0wo1b.html)Photo by Tim Gouw

This step-by-step guide will show you how to create startup and shutdown scripts that will notify another PC when the target PC is turned on or off.

Create the Scripts

The first step is to create the scripts that will run when the computer is turned on or off.

  1. Create a folder on the C:\ drive named Scripts

  2. Open Notepad

  3. Type @net send [IP Address] Machine started up!

  4. Make sure to change [IP Address] to the IP address of the machine receiving the messages.

  5. Save as C:\Scripts\startup.bat

  6. Create a new document in Notepad

  7. Type @net send [IP Address] Machine shut down!

  8. Make sure to change [IP Address] to the IP address of the machine receiving the messages.

  9. Save as C:\Scripts\shutdown.bat

  10. You can close Notepad now

Set the Scripts to Run at Startup/Shutdown

The next step is to set those scripts to run.

  1. Click Start > Run

  2. Open Group Policy by typing gpedit.msc and pressing Enter

  3. In the left pane, expand Computer Configuration > Windows Settings

  4. Click on Scripts (Startup/Shutdown)

  5. In the right pane, double-click on Startup

  6. Click Add…

  7. Click Browse…, find the file C:\Scripts\startup.bat and click Open

  8. Click OK

  9. Click OK once more

  10. Now double-click Shutdown

  11. Click Add…

  12. Click Browse, find the file C:\Scripts\shutdown.bat and click Open

  13. Click OK

  14. Click OK once more

  15. You can close Group Policy now

Turn Messenger Service On

Finally, to ensure the messages go through, the Messenger service must be running.

  1. Click Start > Run

  2. Type services.msc and press Enter

  3. Find the service labeled Messenger and double-click on it

  4. Change the Startup type to Automatic if it isn’t already

  5. Click OK

  6. You can close Services now

 
Share this