I have Inno Setup installer (written before me) which extracts a set of VSTO files and starts VSTO MS Office addin installation then. It has a problem that upon extracting VSTO files into a temp folder and launching VSTOInstaller.exe
it immediately displays Finish button. If the user clicks it, temporary files are deleted and starting the actual installation of VSTO addin in VSTOInstaller
then results in "file not found" errors. I'm supposed to fix that (ideally, to have Finish button in Inno Setup installer appear only when VSTOInstaller
spawned by it has finished execution).
VSTO package itself (a collection of "Application Files" folder, setup.exe
and .vsto
file) is created by ClickOnce Publish tool in Visual Studio. The package is digitally signed, etc.
I tried various options:
- To not finish the Inno Setup installation until the process which opens
.vsto
file finishes (withwaituntilterminated
flag). Doesn't work, seems the process changes during opening the.vsto
file,VSTOInstaller
isn't the first process in the chain. Thus, Inno Setup waits only for the process which quickly passes execution to another process (VSTOInstaller
) and then shuts down. - To not remove extracted files upon the installation (with
uninsneveruninstall
flag). Looks like it only works for uninstallation while removing temp files during the installation is somewhat different. I didn't find any way to keep the unpacked files intact after finishing the installation.
Currently .iss
file looks like:
;---------------------------------------------------------------------
[Setup]
AppName=Outlook Addin
AppVerName=Outlook Addin 2.0
DefaultDirName={tmp}
DefaultGroupName=Outlook Sync Addin
Compression=bzip
Uninstallable=no
OutputBaseFilename=OutlookSetup
VersionInfoVersion=2.0.0.10
UsePreviousAppDir=no
;
;---------------------------------------------------------------------
[Files]
Source: "SourcesForExe\*"; DestDir: "{app}"; Attribs: hidden system; Flags: recursesubdirs uninsneveruninstall
;---------------------------------------------------------------------
[Run]
Filename: "{app}\OutlookAddin.vsto"; Parameters: "OVERRIDE=YES"; StatusMsg: "Extracting Outlook Addin installer..."; Flags: shellexec waituntilterminated
Originally, the installer run setup.exe
rather than OutlookAddin.vsto
. This caused setup.exe
to launch VSTOInstaller.exe
and immediately shut down. I thought changing to OutlookAddin.vsto
(and adding shellexec
flag) would fix that so that VSTOInstaller.exe
would be launched directly by this method but but it didn't work. Turns out .vsto
files are opened by vstoee.dll
first.
Any idea how to either keep unpacked files (it's not a big deal that they will stay in temp folder) or somehow wait for all child processes spawned during the setup process?
If that matters, Inno Setup is 5.2.3, VSTO is built with Visual Studio 2015. Tested with Outlook 2010 and 2016.