The flag applies only to the PE module that sets it. Thus, setting a flag in an EXE does not mean that the modules loaded by this EXE depend on the flag. Each module (DLL, package, etc.) loaded by your EXE will be processed by the loader in accordance with the PE parameters specified in this module.
So, you need to set the PE flag for each module that is in the network share.
For what it's worth, I would recommend adding IMAGE_FILE_REMOVABLE_RUN_FROM_SWAP .
David heffernan
source share