"Always running" in Windows - the standard way to implement a program that reboots itself?

Asked 2 years ago, Updated 2 years ago, 131 views

Recently, I created a simple Windows Server program (called server.exe) that runs a complex, heavy program (heavy.exe) of the server when instructed to the client through the on-premises network, and prevents further execution if it is already heavy.

server exe is always alive and client should be looking at is I can't get the program. In other words, your computer to boot when mobility and care of error if you die, you must restart.

I thought about creating a program to monitor this and solving it, but if the program to monitor it dies, it's a disaster. It's going to be a program that monitors a program that monitors a program that monitors a program. Like an upper neighborhood.

Since I googled, maybe it's because of my poor English writing skills, I'm always searching for how to run it with administrator authority, and I can't find the information I really need. First of all

I've looked for a certain degree.

Is there a standard way?

windows-server

2022-09-21 15:23

1 Answers

The simple way is to create service programs a and b that monitor each other, and if a dies, b saves, and if b dies, a saves.

In fact, we often develop it with this structure like this.

To do it right, you can monitor the process by installing a driver in the kernel area to prevent it from being forced to kill. Vaccines and security programs are structured like this. Install and manage file system filter drivers and process monitoring drivers to prevent file deletion.


2022-09-21 15:23

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.