I have a native EXE (namely a setup.exe type of file). I’d like to inject into it a text resource, e.g. Server=X123456.
The purpose is that upon running the EXE, it would read the text resource and act accordingly. Is there a way to do this from C# code?
Note that there is a similar question, but it focused on injecting skins into a WPF app.
Windows has an API for updating resources in native executables. Check out the documentation for UpdateResource and friends.