96 lines
5.4 KiB
Markdown
96 lines
5.4 KiB
Markdown
# Version12 advertised-feature upgrade failure and corrected installer
|
|
|
|
## Demonstrated cause
|
|
|
|
The original bootstrapper's `Setup.cs` compared `FileVersionInfo.FileVersion` for:
|
|
|
|
- `%LOCALAPPDATA%\Programs\PlotDirector Companion\PlotDirector.WordAddIn.dll`
|
|
- `%LOCALAPPDATA%\Programs\PlotDirector Companion\Agent\PlotDirector.Companion.Agent.exe`
|
|
|
|
Both physical files are **1.0.0.10**. The expected application version is correctly
|
|
**1.0.0.12** (`SetupRelease.Version`), not the three-part MSI version 1.0.12. This
|
|
was not a string-format comparison error or permission to accept the old versions.
|
|
|
|
The real failed setup log at `20261106-194958` records VSTO uninstall result0, MSI
|
|
result0 and current-user context2 verification, then the mismatch at 19:50:19 UTC.
|
|
The MSI trace gives the causal sequence:
|
|
|
|
```text
|
|
FindRelatedProducts: OLDPRODUCTS = version10 ProductCode
|
|
MigrateFeatureStates: based on existing product, setting feature 'Complete' to 'Advertise' state.
|
|
Feature: Complete; Installed: Absent; Request: Advertise; Action: Advertise
|
|
All new payload components: Request: Null; Action: Null
|
|
```
|
|
|
|
The version10 MSI feature was advertised despite the physical version10 files.
|
|
Version12 had the migration bit in its Upgrade row and scheduled MigrateFeatureStates.
|
|
It inherited Advertise, registered the new product but scheduled no local file copies.
|
|
The strict version check correctly caught that false installation success.
|
|
|
|
Read-only native inventory after the user's failed attempt now shows the version12
|
|
ProductCode registered at ProductVersion **1.0.12**, context **2**, with Complete
|
|
feature state **1 (Advertised)** and the physical application files still version10.
|
|
The old MSI product registration was removed by that earlier attempt. This task did
|
|
not attempt to restore, uninstall, repair, launch or replace anything installed.
|
|
Before/after inspection confirms identical physical payload hashes and Word
|
|
registration throughout this investigation; settings were not written.
|
|
|
|
## Correction
|
|
|
|
- Explicit `ADDLOCAL=Complete` in the MSI and compiled bootstrapper policy.
|
|
- Required Complete feature attributes **24**: DisallowAdvertise + UIDisallowAbsent.
|
|
- Removed the Upgrade-row feature-migration bit and MigrateFeatureStates action.
|
|
- Kept the same version12 ProductCode/UpgradeCode. The partially registered version12
|
|
therefore uses same-product repair/recaching, with ADDLOCAL and REINSTALL=ALL;
|
|
upgrading a version10 registration also explicitly selects local installation.
|
|
- Retained exact expected file-version checks. Both detected versions are logged
|
|
independently and included in any mismatch error. Native post-install feature
|
|
state must additionally be **Local (3)**.
|
|
- No application feature, Word adapter, certificate/trust store, user data directory
|
|
or alternative installer infrastructure changed.
|
|
|
|
## Regression and verification
|
|
|
|
`Test-UpgradeRegression.ps1` uses the sanitised real failure fixture, reads both the
|
|
original and corrected MSI, and invokes only the compiled bootstrapper's pure
|
|
selection/version policy. It never runs Setup.Main, opens an installation session,
|
|
executes MSI actions or launches desktop applications.
|
|
|
|
**14 assertions passed.** The original released version12 MSI fails the four key
|
|
local-install authoring invariants; the corrected MSI passes. Tests cover explicit
|
|
local selection for an advertised version10 upgrade and an already registered
|
|
version12 repair, continued refusal of old/mixed file versions with precise
|
|
diagnostics, matching-version acceptance and membership of both required payload
|
|
files in Complete. These checks would have rejected the faulty original package.
|
|
|
|
The earlier 135 checks verified contents, identities, ranges and signatures, but
|
|
did not enforce local feature selection or reject advertised-state migration.
|
|
Their passing results did not prove an installed upgrade. That coverage gap is now
|
|
covered explicitly rather than weakening the version check.
|
|
|
|
The corrected package also passed the existing **96** MSI/CAB/hash/signature and
|
|
scope assertions. The application payload is unchanged from the previously built
|
|
and tested version12 package; its seven regression suites were not rerun. Installer
|
|
compilation/signing occurred once. Only read-only verification was performed.
|
|
|
|
## Corrected artifact
|
|
|
|
`C:\Users\Nick\Downloads\PlotDirectorCompanion-1.0.0.12-upgrade-fix\PlotDirectorCompanionSetup.exe`
|
|
|
|
- Application/EXE version **1.0.0.12**, MSI **1.0.12**.
|
|
- Installer source: `661fdf6650fff8998c83789ade3b2ccbe1e451f7`.
|
|
- Reused application payload: `e0e2cda53cd7b474b3f697abf4186e3166a62af1`.
|
|
- EXE SHA-256: `10C2E6DD524FCBA45EFFB3B2D87AC9D9863D98B661E0AA8AED27EB6D0A31C6C7`.
|
|
- MSI SHA-256: `8C87FEF90C85964A5B2AD261D4FB215F1951CC78AE7EAE47BA903862866F42E0`.
|
|
- Existing developer certificate/signing mechanism retained; no public signing trust
|
|
is claimed. The original failed package and known-good version10 installer remain.
|
|
|
|
Local evidence: `C:\Temp\PlotDirectorUpgradeFix-1.0.0.12`; corrected setup includes
|
|
`setup-evidence.json` and the two verification reports alongside the installer.
|
|
|
|
**An actual installed upgrade/repair has not been performed.** The user must close
|
|
Word normally and run this corrected unified EXE manually, approve normal developer
|
|
trust if requested, then confirm installed file versions, Local feature state,
|
|
tray/IPC, settings and normal Word restart. No automatic recovery or installation
|
|
was attempted by this task. The pre-existing solution edit remains untouched.
|