maumsti 5 Posted March 2 Hello Delphi Praxis community, I'm excited to share my new open-source project, AppWatcher: https://github.com/mbaumsti/Delphi-App-Watcher Have you ever faced the challenge of managing dozens of Delphi applications running on multiple network machines? Finding a convenient time window to replace executables can be a real headache. That's why I developed AppWatcher. AppWatcher is a Delphi component and applications that allows you to remotely control the stopping and restarting of your Delphi applications across your network. Here's how it works: Integrate the TAppWatcherClient component into your Delphi applications. Deploy the AppWatcher Agent on your client machines. Use the AppWatcher Master application to remotely control all your applications. Key features: Remotely stop applications with user notifications. Automatically restart applications after updates. Avoid using RDP or physically accessing each machine. Minimize downtime and streamline deployment. If you're looking for a solution to simplify remote application management in your Delphi environment, I encourage you to check out AppWatcher. Contributions and feedback are welcome! Thank you, 4 Share this post Link to post
aehimself 402 Posted Saturday at 10:38 PM Include some security. The first glance there's nothing stopping me from shutting down all your programs if I get into your network. Are you sure you need to keep a TCP connection up with each agent? UDP would be a lot more practical, plus you could do the discovery with a simple broadcasted message. Share this post Link to post
maumsti 5 Posted Sunday at 07:42 PM Thank you for your feedback! Security is a key concern, and I have planned to secure all communications using TLS encryption. This is precisely why I chose TCP instead of UDP—to leverage TLS easily and ensure message integrity and authentication. With TLS, only authorized clients will be able to send and receive commands securely, preventing unauthorized shutdowns or deployments. UDP could be useful for discovery, but for executing critical commands, TCP with TLS provides much stronger protection. That being said, if a malicious actor has already gained access to the network, their primary goal would likely not be just shutting down applications but rather compromising systems, exfiltrating data, or escalating privileges... Share this post Link to post
aehimself 402 Posted Sunday at 07:50 PM 1 minute ago, maumsti said: That being said, if a malicious actor has already gained access to the network, their primary goal would likely not be just shutting down applications but rather compromising systems, exfiltrating data, or escalating privileges... With this I completely agree. Meaningful attacks (and their mitigation) are out of the scope of this project however (especially if we are somewhat "controlling" endpoints) we should do our part in cybersecurity :) Share this post Link to post
maumsti 5 Posted Sunday at 08:09 PM Yes, we need to do what is necessary for security. I am thinking of first modifying the communications between the agent and the applications by using Named pipes. In a second step, I will work on using TLS between the master and the agents. 1 Share this post Link to post
corneliusdavid 229 Posted 23 hours ago This looks like a great solution to add to a project I inherited where the users are accustomed to running the app from a network server. I have access to the server to manage the database and update the app but sometimes they leave it running at the end of the day which locks the app from being updated. Share this post Link to post
aehimself 402 Posted 22 hours ago 35 minutes ago, corneliusdavid said: sometimes they leave it running at the end of the day which locks the app from being updated. I'm not sure because we are talking about a network share, but renaming the file and placing the new .exe (with the same name) might still work. A lot of us use this technique in updating our applications. Share this post Link to post
corneliusdavid 229 Posted 22 hours ago Yes, and I've done that as well in some situations but I want the users to run the updated version the next day when they come into the office; if they left it running, they'll still be using the old version still in memory. Of course, I could add something that checks every minute or so and prompts to restart the app or something. 7 minutes ago, aehimself said: A lot of us use this technique in updating our applications. Or use this--thanks for the link. So many choices! 1 Share this post Link to post
aehimself 402 Posted 22 hours ago Unfortunately that is true. If the old version running, it will stay that way until it is closed. At least you can make sure that the new instances are the updated version :) Share this post Link to post
maumsti 5 Posted 22 hours ago Hello aehimself, Yes it's for this reason that I wrote this application. I place my executables on a network drive and I cannot afford to have one or the other on a different version. I also have the problem that a certain number forget to exit the application and you cannot replace the executable as long as it isn't released by everyone. My application allows this under better conditions because it tries to close applications in a clean and secure way. Since my first publication I have completed my application (version 2.0.1) with a module that allows automatically copying executable files from a source directory to the shared directory. You just need to maintain an updated list of programs that you want to manage in this way. Share this post Link to post
Ian Branch 131 Posted 19 hours ago 3 hours ago, corneliusdavid said: I could add something that checks every minute or so and prompts to restart the app or something. FWIW, I use an Application based Time-out that shuts the application down if there hasn't been any application activity, mouse or keyboard, for a defined period. Share this post Link to post
corneliusdavid 229 Posted 18 hours ago Just now, Ian Branch said: FWIW, I use an Application based Time-out that shuts the application down if there hasn't been any application activity, mouse or keyboard, for a defined period. I've done that in the past as well. In fact, there's a component in my Github library, CloseApplication, to do that. I don't know the habits or the code on this current project well enough to confidently apply that yet. For example, if I set a 3-hour timeout but someone is still in the office at 7:00 PM and I'm wanting to update at 9:00 PM, then the app could still be open. I like the idea of being able to "Remotely stop applications with user notifications." Now, my only problem is that this old project I've inherited is still in Delphi 7--this App Watcher component is in D12 so I probably can't use it yet. Share this post Link to post