Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add bal:DisplayFilesInUseDialogCondition attribute to disable "Files In Use" #573

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

charles-juicelabs
Copy link

@charles-juicelabs charles-juicelabs commented Oct 31, 2024

We develop an application with a DLL that is loaded into many processes, largely outside of our control. It is confusing for our users when they are prompted to close these seemingly unrelated applications when we update the DLL. Updating the DLL requires a reboot independently of any files being in use anyway, so hiding the "Files In Use" dialog is a nice solution for us.

There are other examples of people wanting to disable the "Files In Use" dialog:

Add bal:DisplayFilesInUseDialogCondition, similar to bal::DisplayInternalUICondition, to be added to MsiPackage elements to control the display of "Files In Use" in WixStandardBoostrapperApplication.

For example:

<Bundle Name="...">
  <!-- ... -->
  <Chain>
    <MsiPackage 
      Id="..."
      SourceFile="..."
      bal:DisplayFilesInUseDialogCondition="no"
    />
  </Chain>
</Bundle>

Fixes wixtoolset/issues#8807.

Disabling display skips showing the "Files In Use" dialog and returning
a result as if the user had chosen to ignore the dialog and reboot in
the case of files that were unable to be replaced.
Copy link

CLA Assistant Lite bot:
Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request

@@ -1231,34 +1231,52 @@ class CWixStandardBootstrapperApplication : public CBootstrapperApplicationBase
__inout int* pResult
)
{
HRESULT hr = S_OK;
Copy link
Author

@charles-juicelabs charles-juicelabs Oct 31, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wondered if the DisplayFilesInUseDialogCondition should be evaluated in OnExecutePackageBegin or OnPlanPackageBegin instead. I left it here because that's closest to its only use and that seemed clearer. Happy to move it if either of those are more appropriate places.

@charles-juicelabs
Copy link
Author

I have read the CLA Document and I hereby sign the CLA.

@charles-juicelabs
Copy link
Author

recheck.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Hide "Files In Use" dialog behaving as if ignore was chosen
1 participant