Emmanuel Derriey
Posts: 16
Joined: Tue Sep 03, 2013 3:28 pm

Send (or prepare) an email during installation

Hi,

In case of trouble, I'd like to customize the error dialog with my custom text (no problem) and propose the user to be contacted by our support team: the aim is to ask the name, compagny and email of the user and send an email to our support with these informations. Is it possible?
If so, can I:
- send direct the mail from AI?
- prepare an e-mail in mail client application?

I use 9.6.1 version.

Best regards,

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

Re: Send (or prepare) an email during installation

Hello Manu,

I'm afraid we don't have predefined support for this.
However, you can create your own custom action which will implement this scenario.

For example, you can create your custom action as a custom action written in C# or a custom action written in C++. You can use the mailto Protocol which opens a client's e-mail system and begins a new email message. Unfortunately, the mailto protocol does not support programmatically adding attachments (e.g. log file) even though some e-mail clients may have a way of handling that.

Then, you can go in the “Custom Actions” page and add a predefined Launch attached file custom action without sequence. This type of custom action can execute an application (EXE or DLL) or run a script (VBScript or Java script). Also, the source file will be embedded in the MSI file but will not be deployed at install time with the other application files.

On the FatalError dialog you can have a Check Box control (e.g. Contact support team).
Then, on the [ Finish ] button from the FatalError dialog, you can add the custom action as a published event and condition its execution upon the property assigned to the check box control (by default it is CHECKBOX_1_PROP). This way, the custom action will be executed if the option to contact the support team is selected.

Please let us know if that helped.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Emmanuel Derriey
Posts: 16
Joined: Tue Sep 03, 2013 3:28 pm

Re: Send (or prepare) an email during installation

Hi,

Thank's for your answer, and sorry for the delay.
I changed my mind, I indicate information how to contact our support.
More over, I use http post to send information to our support so that we can have information about installation failure : OS version, admin or not etc.

Question: on installation failure, is there a way to have an error code ou reason in a variable to send in http post?

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

Re: Send (or prepare) an email during installation

Hello Manu,

In order to achieve that, you can use a DLL custom action for example, you can create your custom action as a custom action written in C# or a custom action written in C++ which will parse the installation log file and search through the log to see where the installation fails or gather useful information about the installation process. You can take advantage of the MsiLogFileLocation property's value which is set to the full path of the log file, when logging is enabled.

You can set a property with related information and send it though the property list of the predefined Send install information to your web server custom action. For details please see: Collect installation data and send it to a web server.

You can also take a look on the What is the maximum number of characters that can be stored in a Windows Installer property thread which may be useful to you.

If you use this functionality you should disclose the information to be collected to the user and ask for his permission before sending any information to the web server. We strongly recommend that you display Privacy Policy document detailing what information you collect and how you intend to use it.

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

Return to “Common Problems”