Solved

overwrite the application file from itself

Posted on 2006-07-10
4
339 Views
Last Modified: 2010-04-05
I would like my application to overwrite itself, I want change some setup setting incorporated in the exe application file. I am able to open it for reading with the (fmOpenRead Or fmShareDenyNone) flags, but it fails using fmOpenReadWrite.
0
Comment
Question by:gianluca
  • 2
4 Comments
 
LVL 45

Expert Comment

by:aikimark
ID: 17076587
You will need to kick off another task to do this, since the system automatically locks the exe file at the start of execution.
0
 

Author Comment

by:gianluca
ID: 17076907
Can I create a new thread to stand-by for the application close, then update the file and close itself ???
0
 
LVL 45

Expert Comment

by:aikimark
ID: 17077055
You should create a new process.  A new thread would likely be destroyed when the application (process) terminates.
0
 
LVL 10

Accepted Solution

by:
atul_parmar earned 125 total points
ID: 17081072
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question