That's exactly what I was trying to say ;-)
With restart manager, IDRETRY is not required and is actually making things
unpredictable for the user. But without restart manager, IDRETRY is required
to make sure the user has actually closed all applications. And if I
understand the behavior correct, INSTALLMESSAGE_FILESINUSE is only send if
restart manager fails, is not available or if IDRETRY is returned by the UI.
Returning IDOK at this point will be the same as IDIGNORE but UI would still
indicate that it's normally closing applications automatically.
I think the old FilesInUse behavior without restart manager is getting more
and more deprecated, at least now after Windows XP support is dropped. But
IIRC restart manager can still be disabled e.g. by a group policy.
I have three suggestions to solve this. Tell me what you think.
1. Live without a retry button until v4.0 and try to phrase the dialog
to cover both cases
2. Let the engine also call OnExecuteMsiMessage() for
INSTALLMESSAGE_FILESINUSE and INSTALLMESSAGE_RMFILESINUSE. This way it's up
to the bootstrapper application to decide whether to use
OnExecuteFilesInUse() or OnExecuteMsiMessage(). This should also not
interfere with existing bootstrapper applications
3. Introduce another return value for OnExecuteFilesInUse() which is
interpreted as either IDOK for restart manager or IDRETRY without it. This
should not affect existing bootstrapper applications, but allows newer ones
to tell whether restart manager has failed or not (by simply determining
whether OnExecuteFilesInUse() is called more than once)
Number 3 is maybe straight forward, because return values are already
interpreted differently there (WIU_MB_OKIGNORECANCELRETRY).
Kind regards,
Georg
Von: Rob Mensching [mailto:r...@firegiant.com]
Gesendet: Freitag, 25. April 2014 17:12
An: WiX toolset developer mailing list
Betreff: Re: [WiX-devs] Feature #4382: Add support for "files in use" in
WixStdBA
First of all, thanks for looking into this feature. It'll be a great
addition.
However, maybe I'm missing something but I think you can get the behavior
you want by simply returning IDOK (to use restart manager if possible),
IDCANCEL (to abort the install) or IDIGNORE (to not bother and just take the
restart). In that scenario, no IDRETRY is required.
However, I think I understand the issue you are pointing out. The BA can't
tell when sending IDOK will be interpreted as a restart manager request and
when IDOK will be interpreted as IDIGNORE (because that's what FilesInUse
does). That's too bad because much of the code is already in place to have
passed it along. It just wasn't done. Probably my mistake a long time ago
thinking it wasn't going to be necessary.
I expect it's true but have you actually verified that returning IDOK from
FilesInUse callback does not use Restart Manager if restart manager is
supported by the MsiPackage? If that is true, then we can pretty easily fix
this in WiX v4.0 by exposing whether the OnExecuteFilesInUse BA callback was
initiated with Restart Manager support. It'll make the comments about the
different return values a bit more complex but it's really just Windows
Installer complexity that we're not hiding here. right?
_______________________________________________________________
FireGiant | Dedicated support for the WiX toolset |
<http://www.firegiant.com/> http://www.firegiant.com/
From: Georg von Kries [mailto:g...@creativbox.net]
Sent: Friday, April 25, 2014 2:02 AM
To: 'WiX toolset developer mailing list'
Subject: Re: [WiX-devs] Feature #4382: Add support for "files in use" in
WixStdBA
Thanks, but I'm not sure if it is a good idea to unify the UI here too. For
me it is all about preventing to require a restart.
I might be wrong, but if restart manager is not used for whatever reasons,
the only possibility to avoid a restart after the installation is to close
the applications in use and click "retry" (UI must return IDRETRY).
Otherwise a restart is always required.
But if a retry button is always shown even when the restart manager is
available, clicking it will cause a fallback to FilesInUse as you mentioned.
It will not be clear that this retry will prevent restarting the
applications automatically. From the user perspective, the same dialog will
reappear if applications are still running, but trying to automatically
restart applications (UI returning IDOK) will then never happen and a
restart is again required.
Maybe I'm just too stuck with the old MSI way and a simple UI saying "try to
automatically close applications, if it's not working we're restarting" is
enough. This way, only the newer restart manager capabilities would be
supported and if restart manager is not available the return value is always
interpreted as IDIGNORE (even if IDOK is returned).
Kind regards,
Georg
Von: Rob Mensching [mailto:r...@firegiant.com]
Gesendet: Donnerstag, 24. April 2014 19:50
An: WiX toolset developer mailing list
Betreff: Re: [WiX-devs] Feature #4382: Add support for "files in use" in
WixStdBA
Why do different controls need to be shown? The implementation has unified
the callbacks such that it should not matter:
// OnExecuteFilesInUse - called when the engine encounters files in use
while
// executing a package.
//
// Return:
// IDOK instructs the engine to let the Restart Manager attempt to
close the
// applications to avoid a restart.
//
// IDCANCEL instructs the engine to abort the execution and start
rollback.
//
// IDIGNORE instructs the engine to ignore the running applications. A
restart will be
// required.
//
// IDRETRY instructs the engine to check if the applications are still
running again.
//
// IDNOACTION is equivalent to ignoring the running applications. A
restart will be
// required.
IIRC, the retry is a little interesting because it will cause the Windows
Installer to switch between FilesInUse and RMFilesInUse which detect things
differently (some better than others).
_______________________________________________________________
FireGiant | Dedicated support for the WiX toolset |
<http://www.firegiant.com/> http://www.firegiant.com/
From: Georg von Kries [mailto:g...@creativbox.net]
Sent: Thursday, April 24, 2014 2:02 AM
To: wix-devs@lists.sourceforge.net
Subject: [WiX-devs] Feature #4382: Add support for "files in use" in
WixStdBA
Hi all,
I'm currently in the process of porting our implementation of an "files in
use" page in WixStdBA from Wix 3.7 (with some custom changes) to the current
version.
Our implementation is currently designed for MSI packages only and resembles
MSIs FileInUse and MsiRMFilesInUse dialogs. It combines them together to a
single additional page in the WixStdBA. This page is displayed like a modal
dialog, i.e. it implements an inner message loop to wait for the user input.
The problem is that the bootstrapper application needs to show different
controls and return different results whether restart manager is enabled or
not. Currently it is impossible to distinguish between
INSTALLMESSAGE_FILESINUSE and INSTALLMESSAGE_RMFILESINUSE in
OnExecuteFilesInUse(). Burn calls OnExecuteFilesInUse() for both MSI
installer messages without any possibility to determine the original
message.
For our own build we have altered the engine to pass the
INSTALLMESSAGE_RMFILESINUSE to OnExecuteMsiMessage() instead of
OnExecuteFilesInUse(). Otherwise changes to the IBootstrapperApplication
interface are required.
Any comments on how to solve this?
Thanks,
Georg
------------------------------------------------------------------------------
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
_______________________________________________
WiX-devs mailing list
WiX-devs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-devs