Link to home
Start Free TrialLog in
Avatar of xoz
xoz

asked on

Updating the Application's EXE file

I would like my Application to check, every time it runs, if there's a newer version of it on the company's intranet, and if there is a newer version, it should replace itself with the new version. (Download the new EXE app version, and replace the old EXE file).
If there's a new version, it should terminate itself and run the new version.
Next time the APP runs, the new EXE file should run.

I can deal with checking for a new version, and downloading it via HTTP.
But, how do I replace the EXE file which is now running with a newer version? Is it a safe thing to do ? How can I do it in another way, if not? (I want the EXE replaced, not to just D/L and run it each time).
ASKER CERTIFIED SOLUTION
Avatar of mflam
mflam

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of xoz
xoz

ASKER

How do I send a message telling the App to shut itself ?
How do I send a win32 terminating message?
Maybe easier:
Have the app (once it notices the newer version) shell out a small app designed just for this transfer and end itself. The small app should now download the new exe. Once the it is downloaded, shell it and have the small app end itself.

Later,
Avatar of xoz

ASKER

Thanks.

Now just for general knowledge:
How do I send a message telling the App to shut itself ?
How do I send a win32 terminating message?