Click here to Skip to main content
15,907,687 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
Would it be possible to write data to an executable as it's executing? My end result is to update the embedded resources inside the executable. For example, inside an executable, I'd have a resource string that lists the last startup time. After the application is closed, it would update the resource string. Is this possible?

Mike
Posted

1 solution

Yes, Create a string property in Settings(Project Properties > Settings).

And then you can access it like this

string tvalue = Properties.Settings.Default.YourPropertyName;


and you can save it, in FormClosing event...like this


Properties.Settings.Default.YourPropertyName = "Some other text";
Properties.Settings.Default.Save();
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900