Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Write data to EXE file
#2
A running EXE tends to lock itself from external changes.  You can read from it, or copy from it, but once it's running, you can't just alter it.  The only way you'd be able to do something like you're talking about would be to copy the EXE to a back-up file, write to that back-up EXE, then write a quick script for DOS to execute after you close the EXE (usually a SHELL _DONTWAIT "batch.bat" followed immediately with a SYSTEM will work just fine) which will delete the old EXE, rename the new backup EXE to the old name, and then restart with the changed EXE (if a restart is needed and you're doing the update when the program closes anyway).
Reply


Messages In This Thread
Write data to EXE file - by Steffan-68 - 05-14-2023, 05:18 PM
RE: Write data to EXE file - by SMcNeill - 05-14-2023, 05:41 PM
RE: Write data to EXE file - by Steffan-68 - 05-14-2023, 08:37 PM
RE: Write data to EXE file - by mnrvovrfc - 05-14-2023, 10:31 PM
RE: Write data to EXE file - by Steffan-68 - 05-15-2023, 09:58 AM
RE: Write data to EXE file - by euklides - 05-15-2023, 03:00 PM
RE: Write data to EXE file - by Steffan-68 - 05-15-2023, 04:23 PM
RE: Write data to EXE file - by Kernelpanic - 05-15-2023, 05:21 PM
RE: Write data to EXE file - by Steffan-68 - 05-15-2023, 06:41 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Must an extra value be provided on DATA statement? dakra137 11 1,046 09-30-2025, 05:38 PM
Last Post: ahenry3068
  BINARY FILE write pmackay 6 700 09-29-2025, 01:06 PM
Last Post: dakra137
  keyword to get the EXE name and the EXE path instead of parsing Command$(0) ? madscijr 8 1,133 07-22-2025, 08:35 PM
Last Post: hsiangch_ong
  Seeking Matches in a Data Base Dimster 10 1,039 07-13-2025, 12:26 AM
Last Post: Dimster
  Change file data krovit 5 1,198 07-11-2024, 07:45 AM
Last Post: krovit

Forum Jump:


Users browsing this thread: