Is it possible to download code and execute / inject it when application is executed?
I want to keep my .exe small and up2date without using an updater.
Been searching google for a while, but couldn't find anything execpt for just downloading other .exe's which always triggers Antivir's.
You should put your business logic in dll(s) and only the update logic in the exe. Each time you start the application it should check for updates. If it needs to, it will download new dll(s) and update its functionality.
By making the dll(s) to be dynamically loaded, you need not even restart the application when an update is performed IF you check for updates the first thing after your exe starts.
The process inside the exe would be the following: 1. Start small exe 2. Check for updates. If needed, download dll(s) in the specific location for dll(s). 3. Load dll(s) from that specific location
Of course, for ease in working with it, you should not allow multiple instances because if you already have it started and you start another instance, you will have another case to handle: you try to make an update but the files you need to overwrite are in use...
There is a way in which you can run an exe, injecting it in other process's address space. But for sure your software will be marked as malware by heuristic av's.
Here is the unit that does the trick if you are interested about the concept.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With