문제

이전 버전 1.0.0.0으로 업그레이드하는 버전 번호 : 1.0.0.1의 응용 프로그램이 있습니다.

새 버전을 설치하려고 할 때 1.0.0.1, 내 시스템에 이미 이전 버전이 설치된 경우, 나는 2869 오류가 발생합니다.

그러나 이전 버전을 수동으로 제거하면 최신 버전을 설치하려고 시도하면 성공적으로 설치됩니다.

새 버전의 제품 코드를 변경했습니다.그러나 업그레이드 코드는 변경하지 않았습니다.

누구나 친절하게 그 이유를 알리고 이것을 위해 고칠 수 있습니까?

도움이 되었습니까?

해결책

In the MSI ProductVersion property only the first 3 fields are significant when comparing versions using the major upgrade logic. So in your case MSI will consider 1.0.0.1 and 1.0.0.0 to both be 1.0.0. FindRelatedProducts will therefore not detect this situation as an upgrade.

The way I approach this is to create a 'packed' version where the 3rd and 4th fields are combined into one using, say (4096*f3 + f4), but this will behove you never to have a 4th field (build number) greater than 4096, and a 3rd field no bigger than 15, since 0xFFFF is the maximum for a version field.

This allows us to perform major upgrades between individual nightly builds, not just service packs, without requiring a bootstrapper to achieve a minor upgrade, and we can have a new productcode for every build so there's no need to have to remember to update it manually when the need arises.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top