bchetana
Posts: 95
Joined: Sat Dec 01, 2012 11:36 am

Message PopUp in silent Installtion

HI We have a MSI package build using AI 10.8. Some of our Clients will be installing, the MSI using Push machanisum.

This installer has a EXCEL Com Addin. We need to close excel before installtion or uninstalltion. for this we used AI custom Action "Message Box" which will intimate the user to the close the Excel it it is opened. This work when we have full UI. But during GPO push(Silent Installtion), the message dosent appere.

How can we have a message in silent installtion ?
bchetana
Posts: 95
Joined: Sat Dec 01, 2012 11:36 am

Re: Message PopUp in silent Installtion

I need the ans ASAP... any Help...
Eusebiu
Posts: 4959
Joined: Wed Nov 14, 2012 2:04 pm

Re: Message PopUp in silent Installtion

Hi,

In order to display a message box in silent installation, you can use the "Execute inline script" custom action with the following code:

Code: Select all

msgbox("Your message")
You can also take a look on the Detect process and Terminate process custom action which might be helpful for you.

Let us know if this helped.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
bchetana
Posts: 95
Joined: Sat Dec 01, 2012 11:36 am

Re: Message PopUp in silent Installtion

I have wix custom action (c#) which will detect the process and show a .net message box. This is working fine when I am testing with following command for silent installation

Msiexec.exe /i setup.msi /qn

But, when the same package is pushed from GPO, the installaton is getting stuck
bchetana
Posts: 95
Joined: Sat Dec 01, 2012 11:36 am

Re: Message PopUp in silent Installtion

Can any one help on this ASAP...
Eusebiu
Posts: 4959
Joined: Wed Nov 14, 2012 2:04 pm

Re: Message PopUp in silent Installtion

Hi,

I investigated this scenario and I reproduced the behavior, but please keep in mind that this is the normal behavior because when a package is deployed through GPO, there is no UI during the installation.

When the machine where the package should be installed on is started, the installation starts automatically at the time the "Logon" window is displayed (before the Desktop screen to be displayed and also before the explorer.exe process is started). But when the message box point is reached, the installation waits for the user to close that message box and that is why it is getting stuck.

The recommended approach for your scenario is to use the "Detect process" and "Terminate process" predefined custom actions as mentioned in the How to give message or alert in silent installation of msi thread.

Let us know if this helped.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
bchetana
Posts: 95
Joined: Sat Dec 01, 2012 11:36 am

Re: Message PopUp in silent Installtion

Hi Eusebiu

Thank you for the reply.

I have seen the link provided by you. Unfortunately that post was made by one of our team member to understand the same issue I was talking about.

So, U say there is no other way to handle this ?????
Eusebiu
Posts: 4959
Joined: Wed Nov 14, 2012 2:04 pm

Re: Message PopUp in silent Installtion

Hi,

I'm afraid that there is no way to display a message box at that point and also, I don't think the Excel process will run at that point. Can you please give me some details about your scenario and why do you want to achieve this?

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
bchetana
Posts: 95
Joined: Sat Dec 01, 2012 11:36 am

Re: Message PopUp in silent Installtion

Hi,

In some of the deployment packages, like (Altiris, SCCM Push) the installation will not be done at the time of system start up. In such cases, the excel process may be running in the user machine during installtion or uninstalltion of the package. This will be in a silent mode.

So we want to handle this senario. How to achive this.
Eusebiu
Posts: 4959
Joined: Wed Nov 14, 2012 2:04 pm

Re: Message PopUp in silent Installtion

Hi,

If the installation is not done at the time of start up, you can use a VBScript custom action as I mentioned above and the message should be displayed even if the installation is done in silent mode. Can you test this and see if it works?

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
bchetana
Posts: 95
Joined: Sat Dec 01, 2012 11:36 am

Re: Message PopUp in silent Installtion

Hi Eusebiu

Ya I used c# message box (In Wix Custom Action) and it worked. The only problem I am facing is in 64bit machine, the message box is shown back of the installaer UI. How can I make the message popup allways on the top. We have the option in message box to set IWin32Window owner so that, the message box will be on top of the owner spacified
[MessageBox.Show(IWin32Window, String)]

What should we pass in this param(IWin32Window) if the wix custom action is called from installer (AI)
Bogdan
Posts: 2794
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Message PopUp in silent Installtion

Hi,

You could try to get the handle of the parent installer window by its process name and then find a method to convert it into an IWin32Window instance.

The name of the process can be:

- the name of your EXE if your setup package is and EXE, like "setup.exe"
- or it can be "msiexec.exe" if you have and MSI as output

Unfortunately our support resources are quite limited so we cannot assist you through coding your custom actions, (with details), we try only to have a quick look and see if we can suggest you a solution that saves you development time.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
alco
Posts: 80
Joined: Thu Nov 18, 2010 5:02 pm

Re: Message PopUp in silent Installtion

For future reference, another way is to get the CLIENTPROCESSID via Session object, then get the process' main window handle, create a NativeWindow instance, assign the main window handle to it, and then use the NativeWindow instance as the owner parameter to MessageBox.Show().
Eusebiu
Posts: 4959
Joined: Wed Nov 14, 2012 2:04 pm

Re: Message PopUp in silent Installtion

Hi,

Thank you for sharing with us your solution, I'm sure it will help other users in the future.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”