Repackaged MSI does not update correctly

Add-in Express™ Support Service
That's what is more important than anything else

Repackaged MSI does not update correctly
 
Inspirometer Developer




Posts: 34
Joined: 2017-10-13
I understand this is not strictly an ADX issue but we thought you may have some experience in this area.

We're having some trouble with auto-updating our Outlook add-in for a client of ours who distributes the add-in via an MSI that they repackaged based on our original MSI publication. Our update routine uses
AddinModule.CurrentInstance.CheckForMSIUpdates()
to get the download path then downloads and runs the latest setup.exe. When users on the repackaged version run the routine, they are confronted by the error "Failed to load 'version_info.xml' file (C:\Users\<user>\AppData\Local\InspirometerMeetingsToolADX_<numbers>\version_info.xml). Task name: ReadXML."

Our original MSI installs the add-in per-user but the repackaged version installs per machine (to program files) and then copies it to the local app data for the user. The local app data copy is the one used by Oulook. I'm struggling to understand why this problem occurs as neither the orignal MSI's installation nor the repackaged version install version_info.xml to local app data, yet the original has no problem with updating.

Any idea what's going wrong here?
Posted 07 Nov, 2018 07:50:58 Top
Andrei Smolin


Add-in Express team


Posts: 16162
Joined: 2006-05-11
Hello,

To create a per-machine add-in, you need to set RegisterForAllUsers=true, create new installer, publish it, and copy the new files (including version_info.xml) to the server.

Your description seemingly misses some of these steps.

Is your installer a regular one or a dual-purpose one?

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 08 Nov, 2018 05:24:19 Top
Inspirometer Developer




Posts: 34
Joined: 2017-10-13
Sorry for the long time to respond - we needed to update our license. We'll set RegisterForAllUsers=true when we publish the next version but I'm not sure it's going to do the trick. The version of the MSI we publish is created using the ADX MSI publish options after creating a setup project using the ADX Setup Project Wizard with the Visual Studio Installer option. It is copied to our server along with version_info.xml. We currently have very little information on how exactly our clients are repackaging the software.

The thing that sticks out most to me is this part of the error "C:\Users\<user>\AppData\Local\InspirometerMeetingsToolADX_<numbers>\version_info.xml". It seems odd that it's looking in the install directory for version_info.xml when the call to CheckForMSIUpdates() has a hardcoded URL to the root of the MSI directory (where version_info.xml and the language code folders). Our call to the function looks like this:
AddinExpress.MSO.ADXClickTwiceVersionInfo versionInfo = new AddinExpress.MSO.ADXClickTwiceVersionInfo();
string updatePath = AddinModule.CurrentInstance.CheckForMSIUpdates(
    @"https://help.inspirometer.com/plugins/imtMSI",
    versionNumber,
    "0",
    out versionInfo,
    null
);

To me it makes no sense that the add-in would look anywhere but the URL we specify for version_info.xml
Posted 21 Nov, 2018 06:49:21 Top
Andrei Smolin


Add-in Express team


Posts: 16162
Joined: 2006-05-11
Hello,

Inspirometer Developer writes:
The thing that sticks out most to me is this part of the error "C:\Users\<user>\AppData\Local\InspirometerMeetingsToolADX_<numbers>\version_info.xml".


It was me who misled you; terribly sorry for this. The path above means you use a per-user setup.exe. To fix this, make sure you have RegisterForAllUsers = true and generate a new setup project; the project will contain a correct setup.exe; the path should be "C:\ProgramData\InspirometerMeetingsToolADX_<numbers>\version_info.xml".

Inspirometer Developer writes:
to get the download path then downloads and runs the latest setup.exe.


We've also noticed this fragment mentions setup.exe. FYI, with the latest versions of ClickTwice you use the downloader here, not setup.exe.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 22 Nov, 2018 05:35:42 Top