ksmith93
Posts: 10
Joined: Wed Sep 13, 2006 5:14 pm

Get Return Value of Configured Prerequisite

Hello,

Thanks for a great product in Advanced Installer. I am using version 4.3 Enterprise, registered.

I'm using AI to create an install package for an app that requires the .NET Framework 2.0. I've read http://www.advancedinstaller.com/forums ... +framework for background information, and I have my AI project configured accordingly.

The .NET Framework install package requires Windows Installer 3.0. For this reason, I have configured my AI project to have a prerequisite on the Windows Installer 3.0 redistributable, WindowsInstaller-KB884016-v2-x86.exe. When I build my AI project, the result is a single EXE which embeds my app stuff (my MSI, etc.), WindowsInstaller-KB884016-v2-x86.exe, and dotnetfx.exe. This is goodness.

Two questions:

(1.) I have WindowsInstaller-KB884016-v2-x86.exe configured as a prerequisite, with a file version Install Condition on MSI.DLL set to 3.0.3790.2180. I've configured WindowsInstaller-KB884016-v2-x86.exe to launch with /silent /norestart command line switches. It works well. But, after WindowsInstaller-KB884016-v2-x86.exe completes, I need to check the return value from the process. Is there a way to obtain the return value from WindowsInstaller-KB884016-v2-x86.exe after the AI setup bootstrapper launches it?

(2.) I have dotnetfx.exe configured to launch with /q:a /c:"install" command line switches. AI launches dotnetfx.exe well, but after dotnetfx.exe completes successfully, the AI setup bootstrapper wizard still thinks that the .NET Framework 2.0 is not installed, even though it was just installed. I have a registry value Install Condition on HKLM\SOFTWARE\Microsoft\.NETFramework\policy\v2.0\50727 set to 50727 per http://www.advancedinstaller.com/forums ... +framework. Why is it that the AI setup bootstrapper wizard still thinks that the .NET Framework 2.0 is not installed?

Thank you very much for your time, and for a great product.
ksmith93
Posts: 10
Joined: Wed Sep 13, 2006 5:14 pm

Follow-Up to: Get Return Value of Configured Prerequisite

The message [from what I believe is the AI bootstrapper] is:

"After launching all packages some required prerequisites are still missing. Press Back to return to the prerequisites list."

But the confusing thing is that all the of prerequisites appeared to indeed install correctly. Everything seems to be working nicely, but it's almost as if AI is not re-evaluating the install conditions. Or, perhaps I have not configured my install conditions or other prerequisites correctly.

Thanks for any tips.
Mihai
Posts: 38
Joined: Wed Mar 23, 2005 12:19 pm

Hi,

You can't obtain the return value of a prerequisite installation. The bootsrapper only checks it and displays a message box. We add that on our TO DO list.

The install condition is evaluated in order to determine if the prerequisite should be installed, and after prerequisite's installation, the same install condition is reevaluaeted to see if its value has changed.

In your case it is very likely that the "install condition" is still "true" even after the installation process. That may happen due to a wrong search type (install condition).

When the AI pops that message you should manually analize the install condition that you use.

Let me know how is going on.

Regards,

Mihai
Mihai Udrea
Advenced Installer Team
ksmith93
Posts: 10
Joined: Wed Sep 13, 2006 5:14 pm

Thank you, Mihai. I will try your suggestions and report back to you.

In general, do you have best practices and recommendations for using AI to install an app which requires the .NET Framework 2.0 *and* Windows Installer 3.0?

One scenario where this would manifest itself is when deploying a .NET 2.0 app to a Windows 2000 SP4 target machine. A Windows 2000 SP4 target machine may not have Windows Installer 3.0 on it. The installation of .NET FW 2.0 requires Windows Installer 3.0.

Although I cannot say for sure, my instincts tell me that this may get tricky because (a.) installation of WI 3.0 may require a system restart and (b.) installation of .NET FW 2.0 implies the use of WI so if we were to proceed with a custom action to perform the .NET FW 2.0 installation from within our install, we may hit snags. There is a possibility that my instincts are wrong, and there is indeed a crisp, clean set of best practices for this deployment scenario.

My ultimate goal is to build a AI project that deploys Windows Installer 3.0 + .NET FW 2.0 + my app.

Thank you for your time, and for a great product in AI.
ksmith93
Posts: 10
Joined: Wed Sep 13, 2006 5:14 pm

Mihai,

I have re-tested per your suggestion, and I am observing similar results. The behavior I am witnessing is as if AI is not re-evaluating the install condition.

When AI shows this message "After launching all packages some required prerequisites are still missing. Press Back to return to the prerequisites list." -- per your suggestion I manually examine the target machine to see if the conditions are met. According to my manual inspection the conditions are both indeed met after AI installs the prerequisties. In this case there are two install conditions: (1.) a file search based on the version info of msi.dll, and (2.) a registry value search based on the info provided in this link http://www.advancedinstaller.com/forums ... +framework

One interesting thing I have discovered is that if I canel out of the AI bootstrapper program after I receive this message "After launching all packages some required prerequisites are still missing. Press Back to return to the prerequisites list." -- and then simply launch my setup.exe again, this time the AI bootstrapper appears to see that the conditions are indeed met and proceeds as expected.

Interested in learning what your next suggestion might be. Thank you for your time.
ksmith93
Posts: 10
Joined: Wed Sep 13, 2006 5:14 pm

Even after all prerequisites are successfully installed, the AI bootstrapper still displays this message "After launching all packages some required prerequisites are still missing. Press Back to return to the prerequisites list." -- welcome any thoughts, feedback, and assistance. Thank you.

Return to “Common Problems”