Wix installation without shutting down Office?

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

Wix installation without shutting down Office?
Have an Outlook add-in, but it won't install without shutting down Outlook, which is not desired behavior 
Brian Link


Guest


I've already pestered the Wix mailing list about this, but since I'm not sure who the culprit is, I'll ask here, too.

By using the command line msiexec.exe /i MySetup.msi /qn, the installer will shut down Outlook if it?Â?Ð?és running and restart it. I would like to have the behavior of installing the add-in, but keeping Outlook open. The new version wouldn?Â?Ð?ét be available in Outlook until the user restarts it, but that's okay. We?Â?Ð?ére doing the installs via SCCM, and don?Â?Ð?ét want to have a user be in the middle of editing something and have the app suddenly go poof.

For some reason, this has worked before, but now it will always restart. Of course I can?Â?Ð?ét think of what?Â?Ð?és different except: I have a new version of Add-in Express installed: could it have anything to do with a new version of the bootstrapper? There's got to be a way to prevent Outlook from restarting automatically.

Thanks for any help.
Posted 07 Mar, 2017 17:44:29 Top
nwein




Posts: 577
Joined: 2011-03-28
Ah, the old update-without-closing-the-host conundrum. We have it working flawlessly, you might want to look at
https://www.add-in-express.com/forum/read.php?PAGEN_1=1&FID=5&TID=14052 about it (granted, we use msi installer and not Wix but I can't believe that there will be any differences in the approach between the two methods.
Posted 08 Mar, 2017 10:37:23 Top
Brian Link


Guest


Thanks nwein - I think I almost grok what you're doing, now I need to try to translate it to the Wix installer. So you've actually got code that 'un-mounts' the old add-in, then installs and re-mounts the new one?
Posted 08 Mar, 2017 11:45:46 Top
nwein




Posts: 577
Joined: 2011-03-28
Yeah, that code is simple as just calling (((ComAddIn)mainAddIn).Connect = false) to disconnect and then update the add-in.
But it does mean there are 2 add-ins installed (one main one and another one for the sole purpose of updating the main one). All this process is not done on the installer side at all (Wix or what have you).
This is a gist of the code calling for the update (within the updater add-in):
string path = "path to your wix installer"
var startInfo = new ProcessStartInfo(path);
var msi = new Process {StartInfo = startInfo};
msi.Start();
msi.WaitForExit();

// Check for sucessful completion
if (msi.ExitCode != 0)
{
	// failure, do something about
}
else
{
	// you're good!
}
Posted 08 Mar, 2017 13:32:59 Top
Brian Link


Guest


Well, this is turning into one of those ephemeral bugs for me. I haven't changed anything, but QA is no longer getting a restart. I'll keep this bookmarked if I do need to do something about it in the future. Thanks!
Posted 08 Mar, 2017 14:34:31 Top