Auto update

Hi All

I have written a Delphi based programming that runs on about 30 client machines. The program is only a single exe. Every week or so I release an update and I must manually copy the new exe to each client machine.

Is there a way that I can program the exe to automatically replace itself if it is outdated?

Thanx

Comments

  • : Hi All
    :
    : I have written a Delphi based programming that runs on about 30 client machines. The program is only a single exe. Every week or so I release an update and I must manually copy the new exe to each client machine.
    :
    : Is there a way that I can program the exe to automatically replace itself if it is outdated?
    :
    : Thanx
    :
    The easiest way is to write an update program. Your program can then start that program using ShellExecute() and terminate itself. The updater can then download the new version (replacing the old one), and start it back up.
    You can even automate that if your main program checks regularly if there is an update. You could for example place a TTimer in your program, which checks a version file on the server.
  • : : Hi All
    : :
    : : I have written a Delphi based program that runs on about 30 client machines. The program is only a single exe. Every week or so I release an update and I must manually copy the new exe to each client machine.
    : :
    : : Is there a way that I can program the exe to automatically replace itself if it is outdated?
    : :
    : : Thanx
    : :
    : The easiest way is to write an update program. Your program can then start that program using ShellExecute() and terminate itself. The updater can then download the new version (replacing the old one), and start it back up.
    : You can even automate that if your main program checks regularly if there is an update. You could for example place a TTimer in your program, which checks a version file on the server.
    :


    How do I use the ShellExecute function? What file do I need to include under the uses list? I'm also not sure how to use Delphi to copy a file.
  • : : : Hi All
    : : :
    : : : I have written a Delphi based program that runs on about 30 client machines. The program is only a single exe. Every week or so I release an update and I must manually copy the new exe to each client machine.
    : : :
    : : : Is there a way that I can program the exe to automatically replace itself if it is outdated?
    : : :
    : : : Thanx
    : : :
    : : The easiest way is to write an update program. Your program can then start that program using ShellExecute() and terminate itself. The updater can then download the new version (replacing the old one), and start it back up.
    : : You can even automate that if your main program checks regularly if there is an update. You could for example place a TTimer in your program, which checks a version file on the server.
    : :
    :
    :
    : How do I use the ShellExecute function? What file do I need to include under the uses list? I'm also not sure how to use Delphi to copy a file.
    :
    ShellExecute() is defined in the ShellApi unit.
    The windows unit defines the API function CopyFile. Otherwise you can setup 2 TFileStream objects and use the CopyFrom() method.
  • : : : : Hi All
    : : : :
    : : : : I have written a Delphi based program that runs on about 30 client machines. The program is only a single exe. Every week or so I release an update and I must manually copy the new exe to each client machine.
    : : : :
    : : : : Is there a way that I can program the exe to automatically replace itself if it is outdated?
    : : : :
    : : : : Thanx
    : : : :
    : : : The easiest way is to write an update program. Your program can then start that program using ShellExecute() and terminate itself. The updater can then download the new version (replacing the old one), and start it back up.
    : : : You can even automate that if your main program checks regularly if there is an update. You could for example place a TTimer in your program, which checks a version file on the server.
    : : :
    : :
    : :
    : : How do I use the ShellExecute function? What file do I need to include under the uses list? I'm also not sure how to use Delphi to copy a file.
    : :
    : ShellExecute() is defined in the ShellApi unit.
    : The windows unit defines the API function CopyFile. Otherwise you can setup 2 TFileStream objects and use the CopyFrom() method.
    :

    I'm having troubles using the ShellExecute() function to start the update program. What is the hWnd (first parameter) used for? The second parameter requires the operation. What should this be? 'run' maybe?

    Thanx for your reply.

  • : : : : : Hi All
    : : : : :
    : : : : : I have written a Delphi based program that runs on about 30 client machines. The program is only a single exe. Every week or so I release an update and I must manually copy the new exe to each client machine.
    : : : : :
    : : : : : Is there a way that I can program the exe to automatically replace itself if it is outdated?
    : : : : :
    : : : : : Thanx
    : : : : :
    : : : : The easiest way is to write an update program. Your program can then start that program using ShellExecute() and terminate itself. The updater can then download the new version (replacing the old one), and start it back up.
    : : : : You can even automate that if your main program checks regularly if there is an update. You could for example place a TTimer in your program, which checks a version file on the server.
    : : : :
    : : :
    : : :
    : : : How do I use the ShellExecute function? What file do I need to include under the uses list? I'm also not sure how to use Delphi to copy a file.
    : : :
    : : ShellExecute() is defined in the ShellApi unit.
    : : The windows unit defines the API function CopyFile. Otherwise you can setup 2 TFileStream objects and use the CopyFrom() method.
    : :
    :
    : I'm having troubles using the ShellExecute() function to start the update program. What is the hWnd (first parameter) used for? The second parameter requires the operation. What should this be? 'run' maybe?
    :
    : Thanx for your reply.
    :
    :
    The hWnd is used for error message dialog boxes. If the operation is nil, then it will assume the "normal" (=double-click) operation. Thus you can simply make that nil.
  • : : : : : : Hi All
    : : : : : :
    : : : : : : I have written a Delphi based program that runs on about 30 client machines. The program is only a single exe. Every week or so I release an update and I must manually copy the new exe to each client machine.
    : : : : : :
    : : : : : : Is there a way that I can program the exe to automatically replace itself if it is outdated?
    : : : : : :
    : : : : : : Thanx
    : : : : : :
    : : : : : The easiest way is to write an update program. Your program can then start that program using ShellExecute() and terminate itself. The updater can then download the new version (replacing the old one), and start it back up.
    : : : : : You can even automate that if your main program checks regularly if there is an update. You could for example place a TTimer in your program, which checks a version file on the server.
    : : : : :
    : : : :
    : : : :
    : : : : How do I use the ShellExecute function? What file do I need to include under the uses list? I'm also not sure how to use Delphi to copy a file.
    : : : :
    : : : ShellExecute() is defined in the ShellApi unit.
    : : : The windows unit defines the API function CopyFile. Otherwise you can setup 2 TFileStream objects and use the CopyFrom() method.
    : : :
    : :
    : : I'm having troubles using the ShellExecute() function to start the update program. What is the hWnd (first parameter) used for? The second parameter requires the operation. What should this be? 'run' maybe?
    : :
    : : Thanx for your reply.
    : :
    : :
    : The hWnd is used for error message dialog boxes. If the operation is nil, then it will assume the "normal" (=double-click) operation. Thus you can simply make that nil.
    :

    You've saved me alot of hours. Thank you Zibadian!
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories