The user himself determines which program he wants to protect, when the program is launched under protection, a lock window appears.

Example

How to implement blocking the launch of the program?

Closed due to the fact that the essence of the question is not clear to the participants of Xander , 0xdb , LFC , freim , aleksandr barakin on Feb. 7 at 15:31 .

Try to write more detailed questions. To get an answer, explain what exactly you see the problem, how to reproduce it, what you want to get as a result, etc. Give an example that clearly demonstrates the problem. If the question can be reformulated according to the rules set out in the certificate , edit it .

  • Is it about your own program or about any? If the latter, then use the standard administration features: for example . - Alexander Petrov
  • @AlexanderPetrov, I'm interested in the program approach - bob torus February

1 answer 1

Let's look at the two easiest ways.

the first is simple. Your program replaces all the "necessary binaries." At startup, she asks for a password and launches a deliberately prepared, renamed copy of the desired program.

Pros:

  • just do
  • does not depend on the version of the OS.
  • super flexible

Minuses:

  • you need to carefully forward the command line parameters
  • you need to take care of the encryption of the main binary, so that the user does not "bypass".
  • any installer will carry everything.

The second is to register your program as an exe file handler (just like it is registered for opening jpg or txt). Minus one and it is very big - the program itself is also exe ... and the development environment ... Debugging turns into a complete nightmare.

In general, you can contact the developers of viruses - they are constantly doing this :)