Solved

Update version Info

Posted on 2011-10-01
11
387 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
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 30

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
 
LVL 32

Assisted Solution

by:ewangoya
ewangoya 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 30

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
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
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 30

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 30

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 30

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 30

Author Closing Comment

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

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Suggested Solutions

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
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…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

747 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now