+ Script info

+ List of available parameters and their script set defaults (null'ed items unless specified get UNSET()):

+ Importing 'cats.ini' key => value pairs from all directories starting in [DOCUMENT_ROOT] thru /sean/code/execute...

+ UNSET()'ing any parameters = 'null'....7 parameters removed

+ Current [PARAM]eters for this page (CATS.INI::[defaults] + URL-based parameters)

+ Current [KEYWORDS] for this page (CATS.INI / [keywords])

+ Retrieving templates...

+ Combining templates; [RECORD]set=>[TABLE]=>[BODY]=>[PAGE]<=NAV

+ Applying S&R on tokenized entries (parameter, _SERVER, keyword, and script)...shrum.net/sean/code/execute
 
Wednesday, Feb 4th  2026 @ 19:00:05  
 
 
  
www . shrum.net /sean/code/execute
All scripting, coding, html, layout, design, .... basically everything here done by yours truly. - S

  

  
 
 
x86 x64 news
 
filter
 clear search
 
 
shrum.net :: Code :: Execute

 Execute

A utility for issuing commands enmass to a group of networked computers.  Great for computer labs and small business with multiple systems.
 

Introduction

Execute is a systray app that monitors a file for commands to execute.  When the timestamp on the monitored TXT file of the same name changes, execute reads the file and runs the command(s) in the file.

The point of this tool is to allow administrators on networked systems to broadcast and execute commands to multiple PC's; such as in a computer lab environment; by editing 1 monitored file. This can also be used to force close applications as well using apps geared toward that result. Primary use will be for mass shutdowns and logoffs (here's a great page with most, if not all, native NT/XP commands). On the evil flipside (in my case), I wrote this gem to punk an unsuspecting jokester coworker (hehe, I'm using the XP shutdown commands as well as launching applications that will seem like random).


Background

I wrote this program while I was setting up computer labs for a private elementary schools.  The computer lab teachers wanted a way to reset all the PC's in the lab between classes quickly as well as being able to pre-stage programs for incoming classes. 

The program launches automatically via the HKLM\software\microsoft\windows\currentversion\run key pointing to the executable in a shared READ-ONLY location on the teachers computer.

In the same location as the executable is a txt file of the same filename....execute.txt.  Best to think of it like a batch file. Commands placed here will be read by the execute program on the workstations and will trigger the actions. I then pre-created files that would allow the computer lab teacher to do things like close all apps (via my killapps project), launch various apps like Word, Paint, Excel, etc, and shutdown all the systems from the computer lab teacher PC.


Usage

Download and store the program on a system in a read-only shared folder of the main PC in your lab / workplace.  Run the app from the client workstation which will set up the program to run on startup from the shared folder. It will begin monitoring for execute.txt in the same location as the EXE file itself (hence the need for a read only folder as this prevents malicious users from modifying the txt file).

Execute.exe can be run with the following parameters:

  • execute.exe
    Runs execute with a SysTray icon and writes a reg entry to HKLM run key
  • execute.exe -1
    Runs execute in hidden mode (no systray icon) and writes a reg entry to HKLM run key
  • execute.exe -2
    Runs execute with a Systray icon and removes the reg entry from HKLM run key
  • execute.exe -3
    Runs execute in hidden mode (no systray icon) and removes the reg entry to HKLM run key

To close the utility, run the program with '-2' or '-3' parameters and reboot or use the task manager to end the execute.exe process.

To trigger a action, simply create or modify the execute.txt file located in the same folder as the executable.  The running app will see the file modification timestamp change, triggering a read of the file and will then execute the commands in the file. The app will then update the monitored timestamp and wait for the next change.

 
 
top

Page generation time = 0.0014/s
Page size (minus graphic elements) = 29kb

bookmark

feedback print

back

Since 1992 - shrum.net

Copyright 2026 Sean Shrum

 
 
CATS.PHP [C]ontent [A]cquisition and [T]emplating [S]cript v.4.14 [ 2025.12.14 ] by Sean Shrum