Solved

Update version Info

Posted on 2011-10-01
11
392 Views
Last Modified: 2012-05-12
Hi all. Another little question, hope not too difficult this one ;-)
I have builded an app whose goal is to update another app. So the system works this way: main app start and chech a php file on the web server passing to it the version info. If php file return outdated, main app launchs downloader and stops. Downloader... downloads, launchs updater and stops.
Updater app is not an installer: I preferred to build a little, simple app which can install not necessarily the main app with a new version number but others updated files.
The problem is that if I update another file and not the main app, this one still has the previous version number so each time it will contact the web server, it will receive outdated as respone.

So the problem is: can the updater program easily ;-) update the version info of the main app or it is a too difficult task? In this case I will think to some other...

Thanks in advance for any idea.

Cheers
0
Comment
Question by:Marco Gasi
[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
11 Comments
 
LVL 4

Assisted Solution

by:WhiteSeed
WhiteSeed earned 100 total points
ID: 36897252
I think the best way to do this is to separate the file with the version information from the executable, creating a separate file or a registry key. To protect the application could also choose to that if these data are not revealed is considered the version of the executable.
0
 
LVL 31

Author Comment

by:Marco Gasi
ID: 36897272
Hi, WhiteSeed. Yes, the registry key was an option I taken in consideration. What I was interested in was if it is possible to 'patch' version info. I yet asked about patch and it was said me that is a too difficult task. I thought that maybe version info are more easy to patch, but don't really know. So if no one else post I will give points to you.

Cheers
0
 
LVL 4

Expert Comment

by:WhiteSeed
ID: 36897354
I think this operation is possible ( because all is possibile) but is not simply because going to change a property of the file which is created to be not editable.
0
Industry Leaders: 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!

 
LVL 32

Assisted Solution

by:Ephraim Wangoya
Ephraim Wangoya earned 100 total points
ID: 36898392
Program versions can be updated similar to the way you would do it manually with a resource editor.

Anyway, you can maintain a configuration file with the version info for all the different programs in your application. On checking for updates, download the current configuration file, compare the versions to determine what needs updating and what does not.
0
 
LVL 31

Author Comment

by:Marco Gasi
ID: 36898552
Hi, ewangoya. Please can you explain what you mean with "Program versions can be updated similar to the way you would do it manually with a resource editor"? It seems to be exactly what I want to do but I don't know how to do it programmatically.

Thanks
0
 
LVL 4

Expert Comment

by:WhiteSeed
ID: 36898787
There is an example of this operation in the delphi example, but is not simply:
'C:\Users\Public\Documents\RAD Studio\8.0\Samples\Delphi\VCL\resXplor' or
Start > All Programs> Embarcadero rad Studio XE > Sample> Delphi\VCL\resXplor or
http://docwiki.embarcadero.com/CodeExamples/en/ResXplorer_Sample

I use delphi xe
0
 
LVL 31

Author Comment

by:Marco Gasi
ID: 36899350
@WhiteSeed: well, sometime we have something in front of our very eyes but we don't see it! nevertheless, running that sample we can get resources but I don't see any method to get version number: I see it in the right string section, but TResourceItem doesn't expose any method to access it. I feel like a homeless which looks at the hamburger behind the shop window and he can't get it!
0
 
LVL 31

Author Comment

by:Marco Gasi
ID: 36899354
...nor edit it!!!
0
 
LVL 1

Accepted Solution

by:
karagunes earned 300 total points
ID: 36907119
I would write a little dll. Export static version info and both apps will get version info from that dll. When you update that dll, all applications will be updated.

Also, you don't need to update version info of each apps. All do different things. Your main app is different than the updater. Why do you need to update version info of your updater? If you want to do that:

1. Create an update file
2. Downloader will download it
3. If download successful, downloader will run it and quit
4. Your update file will check if these apps are still running
5. If they are, updater will terminate both of them
6. Updater will copy new files and run the main app and quit...
0
 
LVL 31

Author Comment

by:Marco Gasi
ID: 36909030
@karagunes, your approach seems to be tha one I'll follow, so I'm going to split points between all (since everyone said something interesting) but I'll give you the most part of points.

@all. Please, take a look at this other question: http://www.experts-exchange.com/Programming/Languages/Pascal/Delphi/Q_27377246.html#a36907996 For some strange reason I had no comment nor EE message about increase points etc.: it seems this question is totally ignored and I don't understand why. I can't request attention because the liunk is not present: maybe someone among you can tell me something about that question or about contactin the moderator.

Thank you very mutch for your help
0
 
LVL 31

Author Closing Comment

by:Marco Gasi
ID: 36909997
Thanks to all.
0

Featured Post

Independent Software Vendors: 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

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
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…
This video Micro Tutorial shows how to password-protect PDF files with free software. Many software products can do this, such as Adobe Acrobat (but not Adobe Reader), Nuance PaperPort, and Nuance Power PDF, but they are not free products. This vide…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

705 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