Home > Software engineering >  How to make a program for compulsory run?
How to make a program for compulsory run?

Time:11-06

How to write a small program, the purpose is to make another program to keep running, timing detection software is running, if not running, then run the software, the software and enter the login account password, if the software is running, do not operate,

CodePudding user response:

Regularly use timer;
Using FindWindow API function to check whether the program to run;
The shell to run the program
SendMessage send password

Probably thinking is such

CodePudding user response:

Mandatory to run! What you mean, the virus? If there is a virus behavior, is to be blocked by antivirus software, if it is normal procedure, you can write a service program, by the service program testing, the principle can be according to the process to create a snapshot to test whether the process exists, does not exist is run, creating process CreateToolhelpSnapshot snapshot API functions,
  • Related