How to update program when user double-clicks icon

D

Dan Tallent

When a user launches the program, I want it to test if an update is
available.
You see many examples of this method to update. (Quickbooks, Norton
AntiVirus, online games)

I have a method already to determine if an update is available and download
it to the end-users computer. It does not automatically run the update.
The plan is let the user choose to update when they go to launch the
program. I was thinking of a loader screen that pops up first and allows
the user to continue.
If the user decides to run the update, this loader screen would need to
launch the setup.exe.

My problem is you cannot update a program you are currently running. What
is the best way to launch the setup.exe, and quit the running program? I
need to be certain that the program has shutdown before the update can
begin.


Thanks in advance.

Dan
 
V

VJ

You could write a wrapper program that will call either your application or
the setup.exe.. So your logic checking for updates will be in the wrapper
program.

Just as a FYI you may want to look into BITS ( articles available in that
name in MSDN ), it provides methods and functions to do a windows like
update.. It also has features to update the updater.exe i.e the currently
running program, we have it implemented for our software updates..

Vijay
 
D

Dan Tallent

BITS appears to be used mainly for the actual download of files to the
end-user. I already have something that preforms this function.
It appears that BITS has the same issue, where your program (wrapper) that
is set to receive the Call Backs will be In-Use when the download is
complete.

Unfortunately, my experience with C is limited. I believe the examples I
found for BITS are based on the software waiting for the download. I have
written a routine to have the file downloaded slowly in the background
during "idle" time. All I require is a method to launch the file that is
already on my hard disk.

The main issue is, some of the files that need updated (wrapper) are still
in use when the user clicks "Update Now".

I will read more on BITS, but I think its not really what I need.

Thanks for your help
Dan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top