EDN Admin
Well-known member
I have an application at a version, and have created an .msi and setup.exe to install it. I am using VS 2010 and C#. However I want to be able to allow people to upgrade to a new version of the application, without them having to remove the current
version (from the control panel) and then install the new version.
From reading about this topic, it seems that all that I have to do is to increment the version number in the various parts of the VS solution (Assembly version in properties). The main part seems to be the client installer / setup project (which also
upgrades the ProductCode when I change the version number in properties window). I have 2 questions about this:
1) Whenever I change the version number, and double click on the .msi install file it starts to install the application. However it doesnt seem to show removing the older version first. It does this however when I right click on the client installer
project and select install (in VS 2010). So is this the way that its supposed to be i.e. should it first remove the previous version before installing the new version? (Note: In order to do this, I had to manually delete the service as below.)
2) The application includes a Windows service. So when I try to install the new version (as above), it tells me that the specified service already exists. Again from reading about this the way to do this seems to be to include an .exe in the
uninstall part of the custom action. I tried doing his by creating a .bat file with a simple sc delete MyService line, then converting this into an .exe file and including this in the uninstall part of the custom action. While this command
(run from .bat or .exe) works fine (deletes the service) if I just have it on my desktop and run it as admin, it doesnt seem to work if I include the exact same .exe file in the uninstall part of the custom action.
Hope this makes sense and any help / suggestions appreciated. <hr class="sig Stephen
View the full article
version (from the control panel) and then install the new version.
From reading about this topic, it seems that all that I have to do is to increment the version number in the various parts of the VS solution (Assembly version in properties). The main part seems to be the client installer / setup project (which also
upgrades the ProductCode when I change the version number in properties window). I have 2 questions about this:
1) Whenever I change the version number, and double click on the .msi install file it starts to install the application. However it doesnt seem to show removing the older version first. It does this however when I right click on the client installer
project and select install (in VS 2010). So is this the way that its supposed to be i.e. should it first remove the previous version before installing the new version? (Note: In order to do this, I had to manually delete the service as below.)
2) The application includes a Windows service. So when I try to install the new version (as above), it tells me that the specified service already exists. Again from reading about this the way to do this seems to be to include an .exe in the
uninstall part of the custom action. I tried doing his by creating a .bat file with a simple sc delete MyService line, then converting this into an .exe file and including this in the uninstall part of the custom action. While this command
(run from .bat or .exe) works fine (deletes the service) if I just have it on my desktop and run it as admin, it doesnt seem to work if I include the exact same .exe file in the uninstall part of the custom action.
Hope this makes sense and any help / suggestions appreciated. <hr class="sig Stephen
View the full article