I have an application that I will be releasing in the next month and I need some help on how to best issue updates to the code. The application is written in C#.net (but the installation code is in VB.net since I wrote it earlier). I wrote a custom installer to do the initial installation. It installs all of the prerequisites and some legacy files & code that will be required. I then build a self extracting file that executes the installation code which just checks for prerequisites and installs them if required. It then installs the legacy stuff I need. The last step it runs is the "setup" project which installs the main program. The product uses an access database. When a code update is required, I will want to keep the config file since the user will likely have a lot of personalized settings as well as the database connection stuff, and the database file will need to be preserved. I will also have to update the shortcut possibly if the name of the exe changes.
Any thoughts on the best way to do this?
Thanks for any insight you can offer.
Pete
Loading
Peter GeorgePosted Nov 2, 2012, 10:53 AM
First I can add code to the application to write the current exe file name and location (the name will contain the version) and the current database location and name to the registry.
Then I can write a custom install program that is packaged with the new executable file and is a self extracting zip file. This install program would run on extract and do the following:
1. Read the registry values for the current database and current exe.
2. Rename the exe.config file to the same name as the file I am going to install keeping the .config extension.
3. Copy the new exe file into the current exe directory.
4. Update the registry to reflect the new exe file
5. (And I have not figured out how to do this quite yet) - Update the shortcut to point to the new exe.
Would this approach make sense?