Click here to Skip to main content
15,885,435 members
Please Sign up or sign in to vote.
2.50/5 (2 votes)
See more:
Hi every one
i have project that i want to update it on my customer machine some sort of changes in forms and database happened . how can i do that ? for making install file i use vs setup and deployment
Posted
Comments
[no name] 19-Sep-14 14:02pm    
Too general question! Forms I think are not a big pb, simply distribute your new app. Database: Your app should recognize which revision of DB is needed.....and upgrade it if necessary. Not always an easy Task :(
amirbt1990 21-Sep-14 5:35am    
yes i can do that but it should be a way to update the applications like updating windows

The question is too general. But, in most cases, it's the best to create a new version of software with different MSI package. Old version should be uninstalled (a copy of old MSI package is always stored and referenced from the installation database), and then new version installed.

The problem is to decide what to do with application data. It became popular to preserve all that data from old installation where it was: in one or more of the directories configured per each user account and/or all user. However, I think that a really good installed should allow the user to choose complete wipe-out of this data during uninstallation. It's too late to do to your existing installer, but you can think about it when you develop the new installation version.

Further, technical detail totally depend on what installation toolkit you use.

[EDIT]

If this simple approach cannot satisfy you by one or another reason, one alternative would be Merge Modules. Please read about them:
http://en.wikipedia.org/wiki/Merge_Module[^],
http://msdn.microsoft.com/en-us/library/windows/desktop/aa369820%28v=vs.85%29.aspx[^],
http://msdn.microsoft.com/en-us/library/aa369820%28v=vs.85%29.aspx[^].

See also: http://msdn.microsoft.com/en-us/library/y0w2est5%28v=vs.80%29.aspx[^].

I mentioned that concrete technical detail depends on what toolkit do you use for your setup project. I would like to emphasize: it should better be based on Windows Installer API, not anything else. You can learn "raw" Windows Installer for better understanding:
http://en.wikipedia.org/wiki/Windows_Installer[^],
http://msdn.microsoft.com/en-us/library/cc185688%28VS.85%29.aspx[^].

—SA
 
Share this answer
 
v2
Comments
george4986 20-Sep-14 0:45am    
hi SA
I have developed a similar application for update exe versions in client machines.we are using windows forms along with web service for connecting live (Database)DB.
.On each installation i save the version in client machine along with msi file.when a new version is released ,we update the version value in a table on live DB and place new msi file on hosting machine(3 tier application).each login time application exe check the live table version with clients version and give user an info msg about new version .User needs to run updater exe for updation.while running updater application it uninstalls previous version using the old msi version stored in client machine ( string arg = "/x \"C:\\OldApplication.msi\"/qn";) , download & installs new exe( string arg1 = "/i \"C:\\Application.msi\"/qn";).updator application is working. Thanks SA for ur patience in reading this message . Is it possible to make it a single application instead of using Two exe's (updator, application) in my case?.If i have done it in a wrong way , plz enlighten me.Waiting for ur valuable suggestions.Thanks in Advance ------------------George--------------
george4986 asked:
hi SA
I have developed a similar application for update exe versions in client machines.we are using windows forms along with web service for connecting live (Database)DB.
.On each installation i save the version in client machine along with msi file.when a new version is released ,we update the version value in a table on live DB and place new msi file on hosting machine(3 tier application).each login time application exe check the live table version with clients version and give user an info msg about new version .User needs to run updater exe for updation.while running updater application it uninstalls previous version using the old msi version stored in client machine ( string arg = "/x \"C:\\OldApplication.msi\"/qn";) , download & installs new exe( string arg1 = "/i \"C:\\Application.msi\"/qn";).updator application is working. Thanks SA for ur patience in reading this message . Is it possible to make it a single application instead of using Two exe's (updator, application) in my case?.If i have done it in a wrong way , plz enlighten me.Waiting for ur valuable suggestions.Thanks in Advance
------------------George--------------
I would not recommend it.

Let's see. In principle, this is possible. But…

First of all, updater will replace some PE files. But it is impossible to remove a PE file when it is loaded for execution. Therefore, you would need to save some temporary updated application, terminate your application, run that temporary updater, and then restart your application. Then you will need to remove that temporary updater.

Worse thing is: it is typical that installation process needs privilege elevation, while the application is typically run without elevation. So, in this case you would need to terminate the application, restart it "As Administrator", do the update and then start application again. As you see, it would defeat the purpose of merging of application and installer/updater.

Also, don't you break the integrity of your system's installation database? It's easy to modify something which is not reflected in this database, but it would break the users' ability to retrace their steps.

Really, it's much better to keep the application and its installer/updater separately.

Consider different thing: not using installation at all. This is called "portable" version of the application these days. At last, even Microsoft started to encourage such things. If you just copy your application to some directory, it can be used immediately. Of course, you if need to update the registry or something like that, you will still need the installation. Another option is to give the user the choice between "portable" and "installation" versions. This is just something to review critically.

—SA
 
Share this answer
 
Comments
george4986 21-Sep-14 10:43am    
thanks SA ;-) for ur feed back.I will definitely check the "portable version". my 5v+ .
Sergey Alexandrovich Kryukov 21-Sep-14 12:25pm    
Thank you. Please, next time don't ask questions on someone else's page. Create a brand-new question.
—SA
george4986 21-Sep-14 22:36pm    
sorry SA , I will ask my further questions as new threads.Once again Thanks ;-)
Sergey Alexandrovich Kryukov 21-Sep-14 23:06pm    
You are welcome.
Please do. I'll try to help if I can.
—SA

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