Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Auto update for application via internet?

Posted on 2006-07-11
6
Medium Priority
?
2,727 Views
Last Modified: 2012-05-05
Hi Experts,

I am using Delphi 7 and need the following.

1. An auto update process (process explained) and code (accompany the process) examples of how to update my software online as bugs or changes occurs. Please help me to design the perfect system on both sides:
a) Creating updates and uploading them as well as
b) on the user's application side to detect and install new updates.

2. My application consists of 2 apps and therefore the main application must check for both updates.
3. How can I only create patches of the exe? Create and Apply them again?
4. My main application should restart automatically after an update has been completed.

BTW: I do have Clever Internet Suite.
I also have a very simple process currently that is working 95% of time but sometimes have problems.

0
Comment
Question by:Marius0188
[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
  • 3
  • 2
6 Comments
 
LVL 17

Expert Comment

by:TheRealLoki
ID: 17087105
does it _need_ to be in "Clever Internet Suite" or can it be 1 of the other already installed sets (sockets, indy) ?
0
 

Author Comment

by:Marius0188
ID: 17087139
Preferably Clever Internet Suite.
I worked with Indy alot but IMHO it's really not getting close to ICS.

But if you have a process and example I can convert it to ICS. Maybe.
0
 
LVL 17

Expert Comment

by:TheRealLoki
ID: 17087253
I know there is a set of free ones at http://www.torry.net/pages.php?id=291
take a look at those. look for "FWS" for "free with source"
however, I have my own using native sockets (which is pretty similar to ICS)

There are a couple of methods.
If you are version 1 and want to go to version3
you can have it install version2, then version 3,
or you can have a version 3 complete install, so you can run it over any prior version
The latter is worse imho, becuase you need to make it backwards compatibe for many versions in case config file structures change etc.

You can make a "patch" filen which is the binary "difference" between project1.exe (version1) and project1.exe (version2)
which means you need to run each patch in sequence, usually accompanied by a setup to convert config ftile structures add settings etc. in case they have changed.
0
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!

 

Author Comment

by:Marius0188
ID: 17087309
I am not interested in the latter method.

Ideally the user should just run the latest update and it should update to the latest version irrespective of
what current version he got.
0
 
LVL 17

Accepted Solution

by:
TheRealLoki earned 600 total points
ID: 17087359
just a thought, 1 real easy way is to just use an ftp server. ignore the rest if this is not an option :-)

you don't need to write the server, just the client
the server holds all the patches, which are either in different subdirectories, or have different filenames
but there is also a "upgrades.ini" file

your ftp client connects, and downloads the "upgrades.ini" file
the client application looks up it's version in the ini file and can see what file it needs to download next

the ini file may look like this :-

[Project1.exe]
Version1.0 Filename=Project1_install.exe
Version2.0 Filename=Project1_PatchToV2.0.exe
Version3.0 Filename=Project1_PatchToV3.0.exe

Version1.0 Next=Version2.0
Version2.0 Next=Version3.0
Version3.0 Next=
; next is blank because this is the last version
----
so, the process may go something like this :-
(myversion = 'Version1.0')
var
    sl: tstringlist;
    tempversion: string;
begin
    sl := tstringlist.create;
    try
        ftp connect
        ftp get  upgrades.ini
        tempversion := myversion;
        with TiniFile.create(extractfilepath(paramstr(0)) + 'upgrades.ini') do
        try
             tempversion := ReadString('Project1.exe', tempversion, '');
             while tempversion <> '' do
             begin
                 sl.add(ReadString('Project1.exe', tempversion + ' Next', '');  // add this file to the list of files we need to download
                 tempversion := ReadString('Project1.exe', tempversion, ''); // check for the next patch
             end;
        finally
            free; // ini file
        end;
// now download the list
        for i := 0 to pred(sl.count) do
            ftp get sl[i]
// if we have some patches, then make a batch file to run the installs
        if sl.count > 0 then
        begin
            sl.insert(0, 'ping 0.0.0.1 -n 1 -w 10000 >NUL'); // just add a 10 second pause to the batch file we are making
// now run the patches in sequence
            sl.savetofile(extractFilePath(paramstr(0)) + 'upgrademe.bat');
        end;  
    finally
        sl.clear;
        sl.free;
    end;
          // run the batch file with createprocess or winexec then close the application - you have 10 seconds...
end;
0
 
LVL 4

Assisted Solution

by:JeePeeTee
JeePeeTee earned 400 total points
ID: 17136947
Can this be of any help? See #3 in the list on the followin link: http://www.appcontrols.com/components.html 
0

Featured Post

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

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

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
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…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Suggested Courses

636 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