Create a "virtual" file and execute it

My search on Google brought me here: How to create a virtual file? In this article, people suggested that the author extract the file into the temp directory and work with it from there.

Actually, what I would like to do is similar to what the author originally requested - create a "virtual" file and assign it a "path" that will be understood by other applications that call the standard Windows API file system. The purpose of this is to prevent copying and unauthorized use.

The concept of what I would like to do:

In our company, we developed a program, but this is not a standard EXE application, it has an internal format (let's say that the application format extension is “.MDL”) and is executed by the runtime, so the runtime must be installed on the client machine. This concept is similar to Java (although it is not Java, just a comparison so you can better understand). What I want to do now is to encrypt this .MDL file and include it as a resource in a regular .exe file. This .exe file will check whether it will be launched (check license conditions, keys, authorization, etc.), and then, if you authenticate, decrypt and extract the .MDL file, execute runtime and pass the virtual path .MDL file as an argument to the runtime. For obvious reasons, I don’t want to write the decrypted .mdl file somewhere on the disk,because someone can just run the application, wait for decrypter to write .MDL to temp, copy it from temp and distribute it.

So any idea how to do this? PS: I am inspired by EA Games ... when you start them and look at your process table, you see a regular exe game, and after a while it starts a new process with a name like ~ A003. Tmp

+3
source share
2 answers

I am not aware of any way to have a virtual file associated with a path without using any driver component; it's a hard work.

Why don't you have decryption execution time? Then you do not need to worry about decrypting the file on disk. Or you can create an unnamed inherited section object that must decrypt the element and pass the descriptor value at run time as a command-line parameter.

, , . EA, - , ; , , . , , , ( , - ).

+1

boxedapp. .

+4

Source: https://habr.com/ru/post/1730460/


All Articles