diff options
| author | Charles Baker <charles@juicelabs.co> | 2024-10-24 13:13:26 +1300 |
|---|---|---|
| committer | Rob Mensching <rob@firegiant.com> | 2026-01-03 06:00:27 -0800 |
| commit | 8ebde131206f1502cbff2055941ffe52e2802439 (patch) | |
| tree | c2d9ab840f59d8036c6f19f714b921b27b60f0f7 /src/ext/Bal/stdbas/WixStandardBootstrapperApplication.cpp | |
| parent | 2a58247b62bdea7c829ca643812faa7665f39a73 (diff) | |
| download | wix-8ebde131206f1502cbff2055941ffe52e2802439.tar.gz wix-8ebde131206f1502cbff2055941ffe52e2802439.tar.bz2 wix-8ebde131206f1502cbff2055941ffe52e2802439.zip | |
Add bal:DisplayFilesInUseDialogCondition to disable Files In Use dialog
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.
Diffstat (limited to 'src/ext/Bal/stdbas/WixStandardBootstrapperApplication.cpp')
| -rw-r--r-- | src/ext/Bal/stdbas/WixStandardBootstrapperApplication.cpp | 52 |
1 files changed, 35 insertions, 17 deletions
diff --git a/src/ext/Bal/stdbas/WixStandardBootstrapperApplication.cpp b/src/ext/Bal/stdbas/WixStandardBootstrapperApplication.cpp index 6cfe0b4c..ddb2d1c5 100644 --- a/src/ext/Bal/stdbas/WixStandardBootstrapperApplication.cpp +++ b/src/ext/Bal/stdbas/WixStandardBootstrapperApplication.cpp | |||
| @@ -1231,34 +1231,52 @@ public: // IBootstrapperApplication | |||
| 1231 | __inout int* pResult | 1231 | __inout int* pResult |
| 1232 | ) | 1232 | ) |
| 1233 | { | 1233 | { |
| 1234 | HRESULT hr = S_OK; | ||
| 1235 | BAL_INFO_PACKAGE* pPackage = NULL; | ||
| 1236 | BOOL fShowFilesInUseDialog = TRUE; | ||
| 1234 | 1237 | ||
| 1235 | if (!m_fShowingInternalUiThisPackage && wzPackageId && *wzPackageId) | 1238 | if (!m_fShowingInternalUiThisPackage && wzPackageId && *wzPackageId) |
| 1236 | { | 1239 | { |
| 1237 | BalLog(BOOTSTRAPPER_LOG_LEVEL_VERBOSE, "Package %ls has %d applications holding files in use.", wzPackageId, cFiles); | 1240 | BalLog(BOOTSTRAPPER_LOG_LEVEL_VERBOSE, "Package %ls has %d applications holding files in use.", wzPackageId, cFiles); |
| 1238 | 1241 | ||
| 1239 | switch (source) | 1242 | hr = BalInfoFindPackageById(&m_Bundle.packages, wzPackageId, &pPackage); |
| 1243 | if (SUCCEEDED(hr) && pPackage->sczDisplayFilesInUseDialogCondition) | ||
| 1240 | { | 1244 | { |
| 1241 | case BOOTSTRAPPER_FILES_IN_USE_TYPE_MSI: | 1245 | hr = BalEvaluateCondition(pPackage->sczDisplayFilesInUseDialogCondition, &fShowFilesInUseDialog); |
| 1242 | if (m_fShowStandardFilesInUse) | 1246 | BalExitOnFailure(hr, "Failed to evaluate condition for package '%ls': %ls", wzPackageId, pPackage->sczDisplayFilesInUseDialogCondition); |
| 1243 | { | 1247 | } |
| 1244 | return ShowMsiFilesInUse(cFiles, rgwzFiles, source, pResult); | 1248 | |
| 1245 | } | 1249 | if (fShowFilesInUseDialog) |
| 1246 | break; | 1250 | { |
| 1247 | case BOOTSTRAPPER_FILES_IN_USE_TYPE_MSI_RM: | 1251 | switch (source) |
| 1248 | if (m_fShowRMFilesInUse) | ||
| 1249 | { | ||
| 1250 | return ShowMsiFilesInUse(cFiles, rgwzFiles, source, pResult); | ||
| 1251 | } | ||
| 1252 | break; | ||
| 1253 | case BOOTSTRAPPER_FILES_IN_USE_TYPE_NETFX: | ||
| 1254 | if (m_fShowNetfxFilesInUse) | ||
| 1255 | { | 1252 | { |
| 1256 | return ShowNetfxFilesInUse(cFiles, rgwzFiles, pResult); | 1253 | case BOOTSTRAPPER_FILES_IN_USE_TYPE_MSI: |
| 1254 | if (m_fShowStandardFilesInUse) | ||
| 1255 | { | ||
| 1256 | return ShowMsiFilesInUse(cFiles, rgwzFiles, source, pResult); | ||
| 1257 | } | ||
| 1258 | break; | ||
| 1259 | case BOOTSTRAPPER_FILES_IN_USE_TYPE_MSI_RM: | ||
| 1260 | if (m_fShowRMFilesInUse) | ||
| 1261 | { | ||
| 1262 | return ShowMsiFilesInUse(cFiles, rgwzFiles, source, pResult); | ||
| 1263 | } | ||
| 1264 | break; | ||
| 1265 | case BOOTSTRAPPER_FILES_IN_USE_TYPE_NETFX: | ||
| 1266 | if (m_fShowNetfxFilesInUse) | ||
| 1267 | { | ||
| 1268 | return ShowNetfxFilesInUse(cFiles, rgwzFiles, pResult); | ||
| 1269 | } | ||
| 1270 | break; | ||
| 1257 | } | 1271 | } |
| 1258 | break; | 1272 | } |
| 1273 | else | ||
| 1274 | { | ||
| 1275 | *pResult = IDIGNORE; | ||
| 1259 | } | 1276 | } |
| 1260 | } | 1277 | } |
| 1261 | 1278 | ||
| 1279 | LExit: | ||
| 1262 | return __super::OnExecuteFilesInUse(wzPackageId, cFiles, rgwzFiles, nRecommendation, source, pResult); | 1280 | return __super::OnExecuteFilesInUse(wzPackageId, cFiles, rgwzFiles, nRecommendation, source, pResult); |
| 1263 | } | 1281 | } |
| 1264 | 1282 | ||
