Click here to Skip to main content
15,912,756 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
My question is not directly related to programming. I want to know the best approach for updating the application. The way I know is to replace the .exe file in your application file with the new updated one. But I wonder how different applications do this while they are running and updates are downloaded from internet.

Any help please?

Thanks
Posted

One way is to create a very basic loader EXE (with a splash screen) that dynamically loads the main application as a series of DLL files.

This loader can replace the old DLL files that have been downloaded to a "Update" folder if updates exists and load the main DLL as usual.
 
Share this answer
 
Yes, the question is pretty much pointless. First, replacing of just one executable file is dangerous as the software product usually have several ones and the main application file usually depends on others, especially DLLs. There are different systems for partial upgrade, but they all are based in some meta-data manifesting versioning and dependencies. Such upgrade systems are pretty complex.

Another thing to remember: when any process is running, it is impossible to delete, modify or replace any of the executable files loaded by this process, as well as data files opened for exclusive use, which is the default. That said, for any upgrade, an application needs to be closed.

—SA
 
Share this answer
 
Another method is to load the updates into an upgrade folder and launch an installer application from there (there's a variety of installers available). First task of the installer, make sure the application you're upgrading is closed.
 
Share this answer
 
Comments
loubnabertat 17-Dec-11 10:16am    
Hi,
i'm a new member in this web site i need your help to déploiement an application i have created with VB.NET 2008.So please help me .Thank You
Albert Holguin 19-Dec-11 9:05am    
Post your questions in the Q&A or the development forums portion of the website. Don't ask individuals for help like this.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900