I am developing a small project in C#. I have used costura-fody
to embed all dependencies into the executable file. I want to embed some mutable content(some settings)in the app as well. So my program would be completely portable.
What I think might work:
I think if the exe copies itself to a different location, starts that executable, and terminates itself, the new exe should be able to make changes to the main exe file. After that it can start the main exe and terminate itself, and the main exe will delete the temporary exe file created. That way I can "logically" make changes in an exe file.
Problem:
I don't know how to do it. I do not know how can I save the settings in the existing exe. I know this is possible ( maybe with a different approach ), because I have seen a program do this. SelfNote does this
Please can anyone help me, how can save data in an existing exe file, and then access it later on, while running that exe ???