We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

istrasoft
Posts: 13
Joined: Sat Nov 02, 2013 3:08 am

Installing Outlook & Office Add-Ins

Hi,

we are building an MSI setup with AI Pro and we have to include a, Outlook and a Word/Excel/Powerpoint add-in in the setup..

Our add-in DLL files were not created in any version of visual studio, so in the add-in wizard there is no "other" option for the question "What your addin was created with", and also we don't happen to have a manifest file, so it seems we can't really use the add-in wizard at all, right ?

So, we simply copy the file where it needs to belong, and add some registry values to make it work.

Since we are migrating from InnoSetup to A.I., we are trying to achieve the same functionality which is to check if any of the Office applications are running (which can be done via a custom action), but we somehow want to display a warning if that is the case, to give the possibility to the user to save all of his work before closing the applicaitons, because simply terminating theses processes will make the user possibly lose some work. So the ideal thing is a warning message being displayed, and the setup should only continue once the applications are all closed.

Of course, this only concens the interactive setup scenario, not the one where an administrator would push the MSI setup via the domain (which would happen on logon, so I suppose that none of the applications would be running yet anyway ?)

What is the best way to approach this kind of behaviour ? is it possible to have a custom action to only display a warning when there is a user interface displayed, and then only proceed once all 4 processes are not running ? (The detect process custom action is only executed once I guess, so is it even possible to use it in this case ?)

Thanks

Thanks
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Installing Outlook & Office Add-Ins

Hello,
So the ideal thing is a warning message being displayed, and the setup should only continue once the applications are all closed.
In order to achieve that you go in the Custom Actions page and add the following custom actions without sequence:
Detect Process - to detect a running process on the target machine.
Display message box - to display a message and inform the user when Office applications are running

Then, in the Dialogs page, we will add these custom actions to be executed as Published Events on a button. (e.g. Next > button from the WelcomeDlg).

So, you can select to execute first the DetectProcess custom action.
You're second custom action which will be executed is MessageBox and it will be executed as long as the AI_PROCESS_STATE = "Running", so you can add this statement in the Condition field of this custom action.

Also, in order to prevent the user to proceed further with the installation you can add the NOT AI_PROCESS_STATE = "Running" statement in the condition field of the Display a specific dialog control event.
This way you will prevent the user to proceed further with the installation as long as the Office application is running. If you need to search if several process are running you can add as many predefined Detect Process custom actions as you need.

You can also take a look on our Execute custom action on button push article.

If there is anything else I can help with, please let me know.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
istrasoft
Posts: 13
Joined: Sat Nov 02, 2013 3:08 am

Re: Installing Outlook & Office Add-Ins

Hello and thanks for the quick answer !

Is all that you described possible with a Professional licence ? because I know there is unfortunately a very strong restriction on Dialogs unless the Enterprise licence is activated...

Thanks
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Installing Outlook & Office Add-Ins

Hello,

Indeed, the Dialog Editor feature require at least an Enterprise project type.

If there is anything else I can help with, please let me know.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
istrasoft
Posts: 13
Joined: Sat Nov 02, 2013 3:08 am

Re: Installing Outlook & Office Add-Ins

So this means, it is impossible with a Professional licence to use the "detect process" feature to pause an installation until the process is closed.

It is not very nice, to put it mildly...
istrasoft
Posts: 13
Joined: Sat Nov 02, 2013 3:08 am

Re: Installing Outlook & Office Add-Ins

Actually I wonder, with the Pro license (so without dialog editor), how can the "detect process" custom action be actually used in a real setup project ?
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Installing Outlook & Office Add-Ins

Hi,

You can use our custom action to detect a process and pause the installation until the user has closed the installation, but you will have to write another custom action of your own (in C+, C# or VBScript) that uses our custom action. Let me explain how:

- first you need to add our predefined custom action "Detect Process" without sequence in your project
- then you need to write another custom actions that does the following, I will present it in shortly:

Code: Select all

- calls our custom action using the Session.DoAction or MsiDoAction APIs, depending on the language used
- gets the value of the property set by our custom action, again using the appropriate API
- if the value shows the process is running then your code should display a message to the user informing to stop the application and try again
- If the user presses OK, confirming he read the information message and closed the application, you start executing the same steps from above. At this stage if the application has not been closed the user will see the same message again, until it closes it.
The purpose of the Enterprise edition is to help our users to get what they want faster and easier, thus with a greater ROI for them. It does not limit the capability of an MSI build with Advanced Installer in anyway. If you would like from a Professional edition you could even have a custom action that alters/edits the content of an MSI dialog (an example in VBS), just as you could easily do with our Dialogs Editor, but of course the effort required to write, debug and test that custom action cannot be compared with how easy it is to do that from our built in support.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
istrasoft
Posts: 13
Joined: Sat Nov 02, 2013 3:08 am

Re: Installing Outlook & Office Add-Ins

Thanks for the explanation Bogdan.

Return to “Building Installers”