After successful install, the GUI does not automatically close as previous versions did

Dec 5, 2011 at 4:38 PM

SUMMARY: After dotnetInstaller finishes to install components successfully  the GUI does not shows installation_completed message and automatically close the process as previous versions did

Test conditions:
Previous versions tested: v1.10.9437.0
Current version tested: v2.0.81.0
OS tested: Windows XP x86 SP2, Windows 7 Home Enterprise SP1.

Previous behavior (v1.10.9437.0): after all components ran, the installation_completed message was show and the bootstrapper process exits. No error reported.

Current behavior (v2.0.81.0): after all components ran, the installation_completed message is not showed and the bootstrapper process remains open. No error reported.

My projects were converted from v1.10 to v2.00 and built the new packages. And after that ran the tests.

Is it a bug or implementation change? Or something that I missed...

Dec 11, 2011 at 2:02 PM

Compare logs between 1.10 and 2.0. I bet some component is marked optional/required now and the bootstrapper doesn't think it's done. If it still looks fishy, file a bug and attach a config and a log.

Dec 28, 2011 at 7:24 PM
Edited Dec 29, 2011 at 11:24 AM

Problem  found:

I´ve ran and compared the logs between v1.10 and v2.0 and nothing different was logged. All operations was the same...

So I've checked to source code: and after a diff I've found a bug or a strange design change:

Let's see:
branch: v1.10    file: dotNetInstallerDlg.cpp    function: OnBtnClickedInstall()

// success and possibly auto-close with a complete code if all components have been installed
if (rc == 0)
{
bool all = LoadComponentsList();
if (all || p_configuration->auto_close_if_installed) // OK!
{
ExecuteCompleteCode(true);
OnOK();
}
}

Compared to latest version 2.0:
trunk:v2.0        file:InstallerUI.cpp    function:Terminate()

// success and possibly auto-close with a complete code if all components have been installed
if (rc == 0)
{
bool all = LoadComponentsList();
if (all) // NOK!
{
ExecuteCompleteCode(true);
if (p_configuration->auto_close_if_installed) // NOK!
{
Stop();
}
}
else
{
LOG("Skipping complete command, not all components reported installed.");
}
}

The difference:
Where previous was the OR'ed conditions: all || p_configuration->auto_close_if_installed, now has AND...

So i´ve set up in my xml config to auto_close_if_installed = TRUE, but the new code is just bypassing if all is not TRUE....

Another report of this change was in the final comment of:
dgarrett97  wrote Jun 24 at 8:45 PM 

in:
http://dotnetinstaller.codeplex.com/workitem/9000

Is it possible to code back the previous behavior?

Jan 3, 2012 at 1:27 PM

The reason why this was changed has to do with optional and required components. The meaning of all here is that all required components were installed. We never want to close the bootstrapper when there's something left that is required.

I bet you have a required component that is really not properly evaluating its condition after install. See if that's the case and post a log file and the configuration if you're still stuck. 

Feb 3, 2012 at 7:50 PM

Sorry by the delay in answer, I was out of the office...

All my components was installed, in both versions of the bootstrapper. The components is marked as required_install = true. But I've not an install_check, that I suppose after analysing the souce code that is a must to the bootstrapper to find the install result...

This behavior was explicited in the change logics of the new version (v2.0).

So its required also that a required_check is present on the component item, otherwise the installer will evaluate as NOT INSTALLED. (always!)...
May be an improvement in the help with a BIG note in could alert about.

But if the new logics has to be keeped, then not all scenarios was covered because if a config install sequence defines:
install p_configuration->auto_close_if_installed = true, but there is no install_check in the component (item) you don't know if the component is installed:

But you can evaluate a result (as a default behavior if) when after installing a component there was no errors and if there is no Installed_Check, then consider it as "installed = true" ...

With these logics the interface will evaluate correctly and the GUI will close automatically.

May 28, 2012 at 8:34 PM

I am facing the same problem. Please will this issue be fixed? Any workaround for this regression?

Thanks for the attention.

Best regards,

Mello

May 28, 2012 at 8:56 PM

Again, it's not a regression. It only works one way, but fails for the other 50% of the cases. We need a new option like "auto_close_if_installed_required" or something like that. It's not trivial to implement, I invite you to do it.

Please post questions in the new google group - https://groups.google.com/group/dotnetinstaller