How can I make msi overwrite old files?

I have a standard Visual Studio installation project (2008) that generates msi containing several files. I noticed, however, that: 1) When msi is installed and some of the files already exist, it simply silently ignores these files. This is a behavior that I do not want, for obvious reasons. 2) When I delete msi, it does not delete my main dll file.

How can I fix these two things? Together, they make it impossible to automatically update my software.

+3
source share
6 answers

I had the same problem and eventually gave up. Getting started is a terrible, complex process involving many GUIDs. After that you will feel very dirty (assuming that you someday will earn).

My advice is to switch to Inno Setup, which is much more suitable for people like you and me.

Leave .msi to those who do "corporate deployments" instead of "installs."

+4
source

Have you increased the version number in your installation project? Increasing the version number will also require the creation of a new product identifier. You must confirm this question yes.

+3
source

, MSI - MSI.

, , , ( DLL), , . , , msi.

, .manifest .vsto, Visual Studio, . DLL CompanionFile, DLL .manifest,.vsto .., .

+2

, [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\SharedDLLs]

MSIZAP aka " Windows", , ( 10 , 1000 .reg ), .

http://robmensching.com/blog/posts/2009/3/6/More-on-Haacks-Troubleshooting-Windows-MSI-Installers , , " " " , .

, Installshield , , .. .. .

, (), , Windows Installer. , . , .

+1

- .
:

[ProgramFilesFolder]\\[ProductName]\\[ProductVersion]

Also set the project project property RemovePreviousVersionsto true.
This should delete the old version folder and create a new folder for the new version.
Remember to change the version property of the installation project each time you make a new version.

+1
source

Another option is to delete the current application and install a new msi, however, this will require a special winforms application

0
source

Source: https://habr.com/ru/post/1705191/


All Articles