Download code and execute on the fly

Is it possible to download the code and execute / paste it when the application is executed?

I want to keep my .exe small and up2date without using an update.

I searched Google for a while, but could not find anything that could just load another .exe that always runs Antivir.

+6
source share
2 answers

You have to put your business logic in the dll and only the update logic in exe. Every time you launch the application, it should check for updates. If necessary, it will download new dlls and update its functionality.

By making the dll dynamically load, you don’t even need to restart the application when the update is in progress, if you check for updates, the first thing after running exe.

The process inside exe will be as follows: 1. Run a small exe 2. Check for updates. If necessary, download dll (s) at a specific location for dll (s). 3. Download the dll from this specific location.

Of course, to make it easier to work with it, you should not allow multiple instances, because if you already started working and you start another instance, you will have to handle another thing: you are trying to update, but the files you need to overwrite are necessary .. .

+7
source

There is a way that you can run exe by entering it into another process address space. But surely your software will be marked as malware by heuristic av.

Here is a unit that does the trick if you are interested in the concept.

+4
source

All Articles