I need to delete the exe file after it is launched so that it cannot be analyzed (unless, of course, the possibility of a dump is missed). There are a couple of methods I know of to do this, but they are very crutches:
- Remove the flash drive after running the program. It will continue to work, but the image will not be available anywhere (which may cause a runtime error when requesting, for example, resources, but this is not important).
- Create a virtual disk and disconnect it when the program is launched from it (does almost the same thing as method 1.
So how do you normally remove the exe at runtime? Maybe working with disks on a physical level?