Solved

overwrite the application file from itself

Posted on 2006-07-10
4
342 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
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…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

730 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