21 lines
1019 B
C#

using System;
using System.IO;
// Pure bootstrapper contract, shared with the upgrade regression. The complete
// desktop application must be installed locally, never advertised on demand.
public static class CompanionUpgradePolicy
{
public static string InstallProperties(bool alreadyRegistered)
{
string properties = "ALLUSERS=\"\" MSIINSTALLPERUSER=1 REBOOT=ReallySuppress ADDLOCAL=Complete REINSTALLMODE=vamus";
return alreadyRegistered ? properties + " REINSTALL=ALL" : properties;
}
public static void VerifyVersions(string expected, string wordVersion, string agentVersion)
{
if (wordVersion != expected || agentVersion != expected)
throw new InvalidDataException("Installed component version mismatch. Expected " + expected +
"; Word add-in detected " + (wordVersion ?? "missing") +
"; tray executable detected " + (agentVersion ?? "missing") + ". Retain the setup log; no trust or Office repair was attempted.");
}
}