How to use util:CloseApplication in Bundle? #9292
-
QuestionHello, according to the documentation, https://docs.firegiant.com/wix/schema/util/closeapplication/ What I'm trying to do, is to simply abort installation and show error message, when specific exe is still running. How do I do that in bundle? Open Source Maintenance Fee
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
|
Those warnings are the clue: this authoring is producing MSI symbols, but the binder is building a Burn bundle.
If the check belongs to the MSI package, put If the check must happen before the bundle applies any packages, implement it in the bootstrapper application layer instead. With WixStdBA, there is not a generic built-in "process is running" bundle condition equivalent to |
Beta Was this translation helpful? Give feedback.
-
|
I'm pretty sure Bundles do not support the CloseApplications element. That must be a doc bug. |
Beta Was this translation helpful? Give feedback.
-
|
I'll post my own answer. I found a way to just create the feature without re-writing the whole bootstrapper application. There is undocumented "BAFunction" aka bootstrapper application function. But a new C++ project is involved. There is even an example about how to do it in the repo: Create C++ dynamic library project, implement it according to the project, and then add dll payload like this in the bundle: The C++ project should reference this nuget package: WixToolset.WixStandardBootstrapperApplicationFunctionApi |
Beta Was this translation helpful? Give feedback.
I'll post my own answer. I found a way to just create the feature without re-writing the whole bootstrapper application.
There is undocumented "BAFunction" aka bootstrapper application function. But a new C++ project is involved. There is even an example about how to do it in the repo:
https://github.com/wixtoolset/wix/blob/main/src/ext/Bal/Samples/bafunctions/WixSampleBAFunctions.cpp
Create C++ dynamic library project, implement it according to the project, and then add dll payload like this in the bundle:
The C++ project should reference this nuget package: WixToolse…