Solved

Auto update for application via internet?

Posted on 2006-07-11
6
2,706 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
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!

 

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 150 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 100 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

729 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