.NET Install Package Sometimes Not Completely Removing Previous Versions

前端 未结 3 1743
半阙折子戏
半阙折子戏 2021-01-06 12:06

I distribute my application using a VS2008 install package, which normally works great. When I create new versions of the app, I go in and increment the Version

相关标签:
3条回答
  • 2021-01-06 12:42

    Not a direct answer, but the key difference between an upgrade and an uninstall+ a reinstall is that any custom uninstall steps are not called in 2k8 but are in 2k5.

    This is referenced in Visual Studio 2005 -> 2008/10 Service Installer Project Upgrade issue

    The other difference related to this is that in 2k8, the files get upgraded based on the version info resource - if your modules dont have newer versions, they dont get replaced.

    In some cases whether you strong name also has effects, but I'm pretty confident the last paragraph covers the issue you're seeing.

    0 讨论(0)
  • 2021-01-06 12:46

    We need to set REINSTALLMODE property of our msi file to amus.

    Following is the link to know more about the meaning of 'amus' http://msdn.microsoft.com/en-us/library/aa371182%28VS.85%29.aspx

    There are two ways to do that.

    1. By using msiexec.exe which comes with .NET SDK (if you have VS 2005 or VS 2008 it will come with it, just browse to command prompt of visual studio and you will find it there)

    once you find msiexec.exe just type following command to set REINSTALLMODE property to amus for your installer.

    msiexec.exe /i foo.msi REINSTALLMODE=amus

    0 讨论(0)
  • 2021-01-06 13:01

    second is By using orca

    Orca is utility to modify msi files.

    You can download 'Orca' from following links. http://www.softpedia.com/get/Authoring-tools/Setup-creators/Orca.shtml

    Steps:

     a. Install orca into your computer.
     b. Open orca
     c. Drag and drop your msi into orca UI
     d. Into left panel it will list the name of tables
     e. select property table
     f. go to right panel and right click
     g. click on 'Add Row'
     h. into 'Property' type REINSTALLMODE
     i. into 'Value' type amus
     j. save msi file
     k. and that's it
    

    Now when you install it will overwrite all files.

    0 讨论(0)
提交回复
热议问题