diff options
Diffstat (limited to 'src/burn/engine')
-rw-r--r-- | src/burn/engine/elevation.cpp | 12 | ||||
-rw-r--r-- | src/burn/engine/logging.cpp | 17 | ||||
-rw-r--r-- | src/burn/engine/logging.h | 4 | ||||
-rw-r--r-- | src/burn/engine/msiengine.cpp | 140 | ||||
-rw-r--r-- | src/burn/engine/msiengine.h | 13 | ||||
-rw-r--r-- | src/burn/engine/mspengine.cpp | 38 | ||||
-rw-r--r-- | src/burn/engine/plan.cpp | 4 | ||||
-rw-r--r-- | src/burn/engine/plan.h | 2 | ||||
-rw-r--r-- | src/burn/engine/userexperience.cpp | 8 | ||||
-rw-r--r-- | src/burn/engine/userexperience.h | 3 |
10 files changed, 163 insertions, 78 deletions
diff --git a/src/burn/engine/elevation.cpp b/src/burn/engine/elevation.cpp index ba6b1dd3..12c9f296 100644 --- a/src/burn/engine/elevation.cpp +++ b/src/burn/engine/elevation.cpp | |||
@@ -1002,6 +1002,9 @@ extern "C" HRESULT ElevationExecuteMsiPackage( | |||
1002 | hr = BuffWriteNumber(&pbData, &cbData, (DWORD)pExecuteAction->msiPackage.fDisableExternalUiHandler); | 1002 | hr = BuffWriteNumber(&pbData, &cbData, (DWORD)pExecuteAction->msiPackage.fDisableExternalUiHandler); |
1003 | ExitOnFailure(hr, "Failed to write fDisableExternalUiHandler to message buffer."); | 1003 | ExitOnFailure(hr, "Failed to write fDisableExternalUiHandler to message buffer."); |
1004 | 1004 | ||
1005 | hr = BuffWriteNumber(&pbData, &cbData, (DWORD)pExecuteAction->msiPackage.fileVersioning); | ||
1006 | ExitOnFailure(hr, "Failed to write fileVersioning to message buffer."); | ||
1007 | |||
1005 | hr = BuffWriteNumber(&pbData, &cbData, (DWORD)pExecuteAction->msiPackage.action); | 1008 | hr = BuffWriteNumber(&pbData, &cbData, (DWORD)pExecuteAction->msiPackage.action); |
1006 | ExitOnFailure(hr, "Failed to write action to message buffer."); | 1009 | ExitOnFailure(hr, "Failed to write action to message buffer."); |
1007 | 1010 | ||
@@ -1083,6 +1086,9 @@ extern "C" HRESULT ElevationExecuteMspPackage( | |||
1083 | hr = BuffWriteNumber(&pbData, &cbData, (DWORD)pExecuteAction->mspTarget.fDisableExternalUiHandler); | 1086 | hr = BuffWriteNumber(&pbData, &cbData, (DWORD)pExecuteAction->mspTarget.fDisableExternalUiHandler); |
1084 | ExitOnFailure(hr, "Failed to write fDisableExternalUiHandler to message buffer."); | 1087 | ExitOnFailure(hr, "Failed to write fDisableExternalUiHandler to message buffer."); |
1085 | 1088 | ||
1089 | hr = BuffWriteNumber(&pbData, &cbData, (DWORD)pExecuteAction->mspTarget.fileVersioning); | ||
1090 | ExitOnFailure(hr, "Failed to write fileVersioning to message buffer."); | ||
1091 | |||
1086 | hr = BuffWriteNumber(&pbData, &cbData, (DWORD)pExecuteAction->mspTarget.action); | 1092 | hr = BuffWriteNumber(&pbData, &cbData, (DWORD)pExecuteAction->mspTarget.action); |
1087 | ExitOnFailure(hr, "Failed to write action to message buffer."); | 1093 | ExitOnFailure(hr, "Failed to write action to message buffer."); |
1088 | 1094 | ||
@@ -2603,6 +2609,9 @@ static HRESULT OnExecuteMsiPackage( | |||
2603 | hr = BuffReadNumber(pbData, cbData, &iData, (DWORD*)&executeAction.msiPackage.fDisableExternalUiHandler); | 2609 | hr = BuffReadNumber(pbData, cbData, &iData, (DWORD*)&executeAction.msiPackage.fDisableExternalUiHandler); |
2604 | ExitOnFailure(hr, "Failed to read fDisableExternalUiHandler."); | 2610 | ExitOnFailure(hr, "Failed to read fDisableExternalUiHandler."); |
2605 | 2611 | ||
2612 | hr = BuffReadNumber(pbData, cbData, &iData, (DWORD*)&executeAction.msiPackage.fileVersioning); | ||
2613 | ExitOnFailure(hr, "Failed to read fileVersioning."); | ||
2614 | |||
2606 | hr = BuffReadNumber(pbData, cbData, &iData, (DWORD*)&executeAction.msiPackage.action); | 2615 | hr = BuffReadNumber(pbData, cbData, &iData, (DWORD*)&executeAction.msiPackage.action); |
2607 | ExitOnFailure(hr, "Failed to read action."); | 2616 | ExitOnFailure(hr, "Failed to read action."); |
2608 | 2617 | ||
@@ -2703,6 +2712,9 @@ static HRESULT OnExecuteMspPackage( | |||
2703 | hr = BuffReadNumber(pbData, cbData, &iData, (DWORD*)&executeAction.mspTarget.fDisableExternalUiHandler); | 2712 | hr = BuffReadNumber(pbData, cbData, &iData, (DWORD*)&executeAction.mspTarget.fDisableExternalUiHandler); |
2704 | ExitOnFailure(hr, "Failed to read fDisableExternalUiHandler."); | 2713 | ExitOnFailure(hr, "Failed to read fDisableExternalUiHandler."); |
2705 | 2714 | ||
2715 | hr = BuffReadNumber(pbData, cbData, &iData, (DWORD*)&executeAction.mspTarget.fileVersioning); | ||
2716 | ExitOnFailure(hr, "Failed to read fileVersioning."); | ||
2717 | |||
2706 | hr = BuffReadNumber(pbData, cbData, &iData, (DWORD*)&executeAction.mspTarget.action); | 2718 | hr = BuffReadNumber(pbData, cbData, &iData, (DWORD*)&executeAction.mspTarget.action); |
2707 | ExitOnFailure(hr, "Failed to read action."); | 2719 | ExitOnFailure(hr, "Failed to read action."); |
2708 | 2720 | ||
diff --git a/src/burn/engine/logging.cpp b/src/burn/engine/logging.cpp index 33295acd..21e010bc 100644 --- a/src/burn/engine/logging.cpp +++ b/src/burn/engine/logging.cpp | |||
@@ -480,6 +480,23 @@ extern "C" LPCSTR LoggingPackageRegistrationStateToString( | |||
480 | } | 480 | } |
481 | } | 481 | } |
482 | 482 | ||
483 | extern "C" LPCSTR LoggingMsiFileVersioningToString( | ||
484 | __in BOOTSTRAPPER_MSI_FILE_VERSIONING fileVersioning | ||
485 | ) | ||
486 | { | ||
487 | switch (fileVersioning) | ||
488 | { | ||
489 | case BOOTSTRAPPER_MSI_FILE_VERSIONING_MISSING_OR_OLDER: | ||
490 | return "o"; | ||
491 | case BOOTSTRAPPER_MSI_FILE_VERSIONING_MISSING_OR_OLDER_OR_EQUAL: | ||
492 | return "e"; | ||
493 | case BOOTSTRAPPER_MSI_FILE_VERSIONING_ALL: | ||
494 | return "a"; | ||
495 | default: | ||
496 | return "Invalid"; | ||
497 | } | ||
498 | } | ||
499 | |||
483 | extern "C" LPCSTR LoggingMsiFeatureStateToString( | 500 | extern "C" LPCSTR LoggingMsiFeatureStateToString( |
484 | __in BOOTSTRAPPER_FEATURE_STATE featureState | 501 | __in BOOTSTRAPPER_FEATURE_STATE featureState |
485 | ) | 502 | ) |
diff --git a/src/burn/engine/logging.h b/src/burn/engine/logging.h index 367b94a3..11f676b3 100644 --- a/src/burn/engine/logging.h +++ b/src/burn/engine/logging.h | |||
@@ -106,6 +106,10 @@ LPCSTR LoggingPackageRegistrationStateToString( | |||
106 | __in BURN_PACKAGE_REGISTRATION_STATE registrationState | 106 | __in BURN_PACKAGE_REGISTRATION_STATE registrationState |
107 | ); | 107 | ); |
108 | 108 | ||
109 | LPCSTR LoggingMsiFileVersioningToString( | ||
110 | __in BOOTSTRAPPER_MSI_FILE_VERSIONING fileVersioning | ||
111 | ); | ||
112 | |||
109 | LPCSTR LoggingMsiFeatureStateToString( | 113 | LPCSTR LoggingMsiFeatureStateToString( |
110 | __in BOOTSTRAPPER_FEATURE_STATE featureState | 114 | __in BOOTSTRAPPER_FEATURE_STATE featureState |
111 | ); | 115 | ); |
diff --git a/src/burn/engine/msiengine.cpp b/src/burn/engine/msiengine.cpp index c80fd79f..509fbb7a 100644 --- a/src/burn/engine/msiengine.cpp +++ b/src/burn/engine/msiengine.cpp | |||
@@ -958,8 +958,8 @@ extern "C" HRESULT MsiEnginePlanAddPackage( | |||
958 | pAction->msiPackage.rgFeatures = rgRollbackFeatureActions; | 958 | pAction->msiPackage.rgFeatures = rgRollbackFeatureActions; |
959 | rgRollbackFeatureActions = NULL; | 959 | rgRollbackFeatureActions = NULL; |
960 | 960 | ||
961 | hr = MsiEngineCalculateInstallUiLevel(display, pUserExperience, pPackage->sczId, FALSE, pAction->msiPackage.action, | 961 | hr = MsiEnginePlanPackageOptions(display, pUserExperience, pPackage->sczId, FALSE, pAction->msiPackage.action, |
962 | &pAction->msiPackage.actionMsiProperty, &pAction->msiPackage.uiLevel, &pAction->msiPackage.fDisableExternalUiHandler); | 962 | &pAction->msiPackage.actionMsiProperty, &pAction->msiPackage.uiLevel, &pAction->msiPackage.fDisableExternalUiHandler, &pAction->msiPackage.fileVersioning); |
963 | ExitOnFailure(hr, "Failed to get msi ui options."); | 963 | ExitOnFailure(hr, "Failed to get msi ui options."); |
964 | 964 | ||
965 | LoggingSetPackageVariable(pPackage, NULL, TRUE, pLog, pVariables, &pAction->msiPackage.sczLogPath); // ignore errors. | 965 | LoggingSetPackageVariable(pPackage, NULL, TRUE, pLog, pVariables, &pAction->msiPackage.sczLogPath); // ignore errors. |
@@ -984,8 +984,8 @@ extern "C" HRESULT MsiEnginePlanAddPackage( | |||
984 | pAction->msiPackage.rgFeatures = rgFeatureActions; | 984 | pAction->msiPackage.rgFeatures = rgFeatureActions; |
985 | rgFeatureActions = NULL; | 985 | rgFeatureActions = NULL; |
986 | 986 | ||
987 | hr = MsiEngineCalculateInstallUiLevel(display, pUserExperience, pPackage->sczId, TRUE, pAction->msiPackage.action, | 987 | hr = MsiEnginePlanPackageOptions(display, pUserExperience, pPackage->sczId, TRUE, pAction->msiPackage.action, |
988 | &pAction->msiPackage.actionMsiProperty, &pAction->msiPackage.uiLevel, &pAction->msiPackage.fDisableExternalUiHandler); | 988 | &pAction->msiPackage.actionMsiProperty, &pAction->msiPackage.uiLevel, &pAction->msiPackage.fDisableExternalUiHandler, &pAction->msiPackage.fileVersioning); |
989 | ExitOnFailure(hr, "Failed to get msi ui options."); | 989 | ExitOnFailure(hr, "Failed to get msi ui options."); |
990 | 990 | ||
991 | LoggingSetPackageVariable(pPackage, NULL, FALSE, pLog, pVariables, &pAction->msiPackage.sczLogPath); // ignore errors. | 991 | LoggingSetPackageVariable(pPackage, NULL, FALSE, pLog, pVariables, &pAction->msiPackage.sczLogPath); // ignore errors. |
@@ -1153,10 +1153,10 @@ extern "C" HRESULT MsiEngineExecutePackage( | |||
1153 | } | 1153 | } |
1154 | 1154 | ||
1155 | // set up properties | 1155 | // set up properties |
1156 | hr = MsiEngineConcatProperties(pPackage->Msi.rgProperties, pPackage->Msi.cProperties, pVariables, fRollback, &sczProperties, FALSE); | 1156 | hr = MsiEngineConcatPackageProperties(pPackage->Msi.rgProperties, pPackage->Msi.cProperties, pVariables, fRollback, &sczProperties, FALSE); |
1157 | ExitOnFailure(hr, "Failed to add properties to argument string."); | 1157 | ExitOnFailure(hr, "Failed to add properties to argument string."); |
1158 | 1158 | ||
1159 | hr = MsiEngineConcatProperties(pPackage->Msi.rgProperties, pPackage->Msi.cProperties, pVariables, fRollback, &sczObfuscatedProperties, TRUE); | 1159 | hr = MsiEngineConcatPackageProperties(pPackage->Msi.rgProperties, pPackage->Msi.cProperties, pVariables, fRollback, &sczObfuscatedProperties, TRUE); |
1160 | ExitOnFailure(hr, "Failed to add obfuscated properties to argument string."); | 1160 | ExitOnFailure(hr, "Failed to add obfuscated properties to argument string."); |
1161 | 1161 | ||
1162 | // add feature action properties | 1162 | // add feature action properties |
@@ -1173,10 +1173,10 @@ extern "C" HRESULT MsiEngineExecutePackage( | |||
1173 | hr = ConcatPatchProperty(pCache, pPackage, fRollback, &sczObfuscatedProperties); | 1173 | hr = ConcatPatchProperty(pCache, pPackage, fRollback, &sczObfuscatedProperties); |
1174 | ExitOnFailure(hr, "Failed to add patch properties to obfuscated argument string."); | 1174 | ExitOnFailure(hr, "Failed to add patch properties to obfuscated argument string."); |
1175 | 1175 | ||
1176 | hr = MsiEngineConcatActionProperty(pExecuteAction->msiPackage.actionMsiProperty, &sczProperties); | 1176 | hr = MsiEngineConcatBurnProperties(pExecuteAction->msiPackage.action, pExecuteAction->msiPackage.actionMsiProperty, pExecuteAction->msiPackage.fileVersioning, TRUE, !pPackage->Msi.cFeatures, &sczProperties); |
1177 | ExitOnFailure(hr, "Failed to add action property to argument string."); | 1177 | ExitOnFailure(hr, "Failed to add action property to argument string."); |
1178 | 1178 | ||
1179 | hr = MsiEngineConcatActionProperty(pExecuteAction->msiPackage.actionMsiProperty, &sczObfuscatedProperties); | 1179 | hr = MsiEngineConcatBurnProperties(pExecuteAction->msiPackage.action, pExecuteAction->msiPackage.actionMsiProperty, pExecuteAction->msiPackage.fileVersioning, TRUE, !pPackage->Msi.cFeatures, &sczObfuscatedProperties); |
1180 | ExitOnFailure(hr, "Failed to add action property to obfuscated argument string."); | 1180 | ExitOnFailure(hr, "Failed to add action property to obfuscated argument string."); |
1181 | 1181 | ||
1182 | LogId(REPORT_STANDARD, MSG_APPLYING_PACKAGE, LoggingRollbackOrExecute(fRollback), pPackage->sczId, LoggingActionStateToString(pExecuteAction->msiPackage.action), sczMsiPath, sczObfuscatedProperties ? sczObfuscatedProperties : L""); | 1182 | LogId(REPORT_STANDARD, MSG_APPLYING_PACKAGE, LoggingRollbackOrExecute(fRollback), pPackage->sczId, LoggingActionStateToString(pExecuteAction->msiPackage.action), sczMsiPath, sczObfuscatedProperties ? sczObfuscatedProperties : L""); |
@@ -1187,9 +1187,6 @@ extern "C" HRESULT MsiEngineExecutePackage( | |||
1187 | switch (pExecuteAction->msiPackage.action) | 1187 | switch (pExecuteAction->msiPackage.action) |
1188 | { | 1188 | { |
1189 | case BOOTSTRAPPER_ACTION_STATE_INSTALL: | 1189 | case BOOTSTRAPPER_ACTION_STATE_INSTALL: |
1190 | hr = StrAllocConcatSecure(&sczProperties, L" REBOOT=ReallySuppress", 0); | ||
1191 | ExitOnFailure(hr, "Failed to add reboot suppression property on install."); | ||
1192 | |||
1193 | hr = WiuInstallProduct(sczMsiPath, sczProperties, &restart); | 1190 | hr = WiuInstallProduct(sczMsiPath, sczProperties, &restart); |
1194 | ExitOnFailure(hr, "Failed to install MSI package."); | 1191 | ExitOnFailure(hr, "Failed to install MSI package."); |
1195 | 1192 | ||
@@ -1197,17 +1194,6 @@ extern "C" HRESULT MsiEngineExecutePackage( | |||
1197 | break; | 1194 | break; |
1198 | 1195 | ||
1199 | case BOOTSTRAPPER_ACTION_STATE_MINOR_UPGRADE: | 1196 | case BOOTSTRAPPER_ACTION_STATE_MINOR_UPGRADE: |
1200 | // If feature selection is not enabled, then reinstall the existing features to ensure they get | ||
1201 | // updated. | ||
1202 | if (0 == pPackage->Msi.cFeatures) | ||
1203 | { | ||
1204 | hr = StrAllocConcatSecure(&sczProperties, L" REINSTALL=ALL", 0); | ||
1205 | ExitOnFailure(hr, "Failed to add reinstall all property on minor upgrade."); | ||
1206 | } | ||
1207 | |||
1208 | hr = StrAllocConcatSecure(&sczProperties, L" REINSTALLMODE=\"vomus\" REBOOT=ReallySuppress", 0); | ||
1209 | ExitOnFailure(hr, "Failed to add reinstall mode and reboot suppression properties on minor upgrade."); | ||
1210 | |||
1211 | hr = WiuInstallProduct(sczMsiPath, sczProperties, &restart); | 1197 | hr = WiuInstallProduct(sczMsiPath, sczProperties, &restart); |
1212 | ExitOnFailure(hr, "Failed to perform minor upgrade of MSI package."); | 1198 | ExitOnFailure(hr, "Failed to perform minor upgrade of MSI package."); |
1213 | 1199 | ||
@@ -1217,31 +1203,11 @@ extern "C" HRESULT MsiEngineExecutePackage( | |||
1217 | case BOOTSTRAPPER_ACTION_STATE_MODIFY: __fallthrough; | 1203 | case BOOTSTRAPPER_ACTION_STATE_MODIFY: __fallthrough; |
1218 | case BOOTSTRAPPER_ACTION_STATE_MEND: __fallthrough; | 1204 | case BOOTSTRAPPER_ACTION_STATE_MEND: __fallthrough; |
1219 | case BOOTSTRAPPER_ACTION_STATE_REPAIR: | 1205 | case BOOTSTRAPPER_ACTION_STATE_REPAIR: |
1220 | { | ||
1221 | LPCWSTR wzReinstallAll = (BOOTSTRAPPER_ACTION_STATE_MODIFY == pExecuteAction->msiPackage.action || | ||
1222 | pPackage->Msi.cFeatures) ? L"" : L" REINSTALL=ALL"; | ||
1223 | LPCWSTR wzReinstallMode = (BOOTSTRAPPER_ACTION_STATE_MODIFY == pExecuteAction->msiPackage.action || BOOTSTRAPPER_ACTION_STATE_MEND == pExecuteAction->msiPackage.action) ? L"o" : L"e"; | ||
1224 | |||
1225 | hr = StrAllocFormattedSecure(&sczProperties, L"%ls%ls REINSTALLMODE=\"cmus%ls\" REBOOT=ReallySuppress", sczProperties ? sczProperties : L"", wzReinstallAll, wzReinstallMode); | ||
1226 | ExitOnFailure(hr, "Failed to add reinstall mode and reboot suppression properties on repair."); | ||
1227 | } | ||
1228 | |||
1229 | // Ignore all dependencies, since the Burn engine already performed the check. | ||
1230 | hr = StrAllocFormattedSecure(&sczProperties, L"%ls %ls=ALL", sczProperties, DEPENDENCY_IGNOREDEPENDENCIES); | ||
1231 | ExitOnFailure(hr, "Failed to add the list of dependencies to ignore to the properties."); | ||
1232 | |||
1233 | hr = WiuInstallProduct(sczMsiPath, sczProperties, &restart); | 1206 | hr = WiuInstallProduct(sczMsiPath, sczProperties, &restart); |
1234 | ExitOnFailure(hr, "Failed to run maintenance mode for MSI package."); | 1207 | ExitOnFailure(hr, "Failed to run maintenance mode for MSI package."); |
1235 | break; | 1208 | break; |
1236 | 1209 | ||
1237 | case BOOTSTRAPPER_ACTION_STATE_UNINSTALL: | 1210 | case BOOTSTRAPPER_ACTION_STATE_UNINSTALL: |
1238 | hr = StrAllocConcatSecure(&sczProperties, L" REBOOT=ReallySuppress", 0); | ||
1239 | ExitOnFailure(hr, "Failed to add reboot suppression property on uninstall."); | ||
1240 | |||
1241 | // Ignore all dependencies, since the Burn engine already performed the check. | ||
1242 | hr = StrAllocFormattedSecure(&sczProperties, L"%ls %ls=ALL", sczProperties, DEPENDENCY_IGNOREDEPENDENCIES); | ||
1243 | ExitOnFailure(hr, "Failed to add the list of dependencies to ignore to the properties."); | ||
1244 | |||
1245 | hr = WiuConfigureProductEx(pPackage->Msi.sczProductCode, INSTALLLEVEL_DEFAULT, INSTALLSTATE_ABSENT, sczProperties, &restart); | 1211 | hr = WiuConfigureProductEx(pPackage->Msi.sczProductCode, INSTALLLEVEL_DEFAULT, INSTALLSTATE_ABSENT, sczProperties, &restart); |
1246 | if (HRESULT_FROM_WIN32(ERROR_UNKNOWN_PRODUCT) == hr) | 1212 | if (HRESULT_FROM_WIN32(ERROR_UNKNOWN_PRODUCT) == hr) |
1247 | { | 1213 | { |
@@ -1283,13 +1249,55 @@ LExit: | |||
1283 | return hr; | 1249 | return hr; |
1284 | } | 1250 | } |
1285 | 1251 | ||
1286 | extern "C" HRESULT MsiEngineConcatActionProperty( | 1252 | extern "C" HRESULT MsiEngineConcatBurnProperties( |
1253 | __in BOOTSTRAPPER_ACTION_STATE action, | ||
1287 | __in BURN_MSI_PROPERTY actionMsiProperty, | 1254 | __in BURN_MSI_PROPERTY actionMsiProperty, |
1255 | __in BOOTSTRAPPER_MSI_FILE_VERSIONING fileVersioning, | ||
1256 | __in BOOL fMsiPackage, | ||
1257 | __in BOOL fFeatureSelectionEnabled, | ||
1288 | __deref_out_z LPWSTR* psczProperties | 1258 | __deref_out_z LPWSTR* psczProperties |
1289 | ) | 1259 | ) |
1290 | { | 1260 | { |
1291 | HRESULT hr = S_OK; | 1261 | HRESULT hr = S_OK; |
1292 | LPCWSTR wzPropertyName = NULL; | 1262 | LPCWSTR wzPropertyName = NULL; |
1263 | LPCWSTR wzReinstallModeOptions = NULL; | ||
1264 | LPCWSTR wzFileVersioning = L""; | ||
1265 | BOOL fReinstallAll = FALSE; | ||
1266 | BOOL fIgnoreDependencies = FALSE; | ||
1267 | |||
1268 | switch (action) | ||
1269 | { | ||
1270 | case BOOTSTRAPPER_ACTION_STATE_INSTALL: | ||
1271 | wzReinstallModeOptions = L"mus"; | ||
1272 | break; | ||
1273 | case BOOTSTRAPPER_ACTION_STATE_MINOR_UPGRADE: | ||
1274 | if (fMsiPackage) | ||
1275 | { | ||
1276 | // If feature selection is not enabled, | ||
1277 | // then reinstall the existing features to ensure they get updated. | ||
1278 | fReinstallAll = !fFeatureSelectionEnabled; | ||
1279 | |||
1280 | wzReinstallModeOptions = L"vmus"; | ||
1281 | } | ||
1282 | break; | ||
1283 | case BOOTSTRAPPER_ACTION_STATE_REPAIR: __fallthrough; | ||
1284 | case BOOTSTRAPPER_ACTION_STATE_MEND: __fallthrough; | ||
1285 | case BOOTSTRAPPER_ACTION_STATE_MODIFY: | ||
1286 | if (fMsiPackage) | ||
1287 | { | ||
1288 | fReinstallAll = BOOTSTRAPPER_ACTION_STATE_MODIFY != action && !fFeatureSelectionEnabled; | ||
1289 | wzReinstallModeOptions = L"cmus"; | ||
1290 | fIgnoreDependencies = TRUE; | ||
1291 | } | ||
1292 | else | ||
1293 | { | ||
1294 | wzReinstallModeOptions = L"mus"; | ||
1295 | } | ||
1296 | break; | ||
1297 | case BOOTSTRAPPER_ACTION_STATE_UNINSTALL: | ||
1298 | fIgnoreDependencies = TRUE; | ||
1299 | break; | ||
1300 | } | ||
1293 | 1301 | ||
1294 | switch (actionMsiProperty) | 1302 | switch (actionMsiProperty) |
1295 | { | 1303 | { |
@@ -1313,11 +1321,46 @@ extern "C" HRESULT MsiEngineConcatActionProperty( | |||
1313 | ExitOnFailure(hr, "Failed to add burn action property."); | 1321 | ExitOnFailure(hr, "Failed to add burn action property."); |
1314 | } | 1322 | } |
1315 | 1323 | ||
1324 | if (fReinstallAll) | ||
1325 | { | ||
1326 | hr = StrAllocConcatSecure(psczProperties, L" REINSTALL=ALL", 0); | ||
1327 | ExitOnFailure(hr, "Failed to add reinstall all property."); | ||
1328 | } | ||
1329 | |||
1330 | if (wzReinstallModeOptions) | ||
1331 | { | ||
1332 | switch (fileVersioning) | ||
1333 | { | ||
1334 | case BOOTSTRAPPER_MSI_FILE_VERSIONING_MISSING_OR_OLDER: | ||
1335 | wzFileVersioning = L"o"; | ||
1336 | break; | ||
1337 | case BOOTSTRAPPER_MSI_FILE_VERSIONING_MISSING_OR_OLDER_OR_EQUAL: | ||
1338 | wzFileVersioning = L"e"; | ||
1339 | break; | ||
1340 | case BOOTSTRAPPER_MSI_FILE_VERSIONING_ALL: | ||
1341 | wzFileVersioning = L"a"; | ||
1342 | break; | ||
1343 | } | ||
1344 | |||
1345 | hr = StrAllocConcatFormattedSecure(psczProperties, L" REINSTALLMODE=\"%ls%ls\"", wzReinstallModeOptions, wzFileVersioning); | ||
1346 | ExitOnFailure(hr, "Failed to add reinstall mode."); | ||
1347 | } | ||
1348 | |||
1349 | hr = StrAllocConcatSecure(psczProperties, L" REBOOT=ReallySuppress", 0); | ||
1350 | ExitOnFailure(hr, "Failed to add reboot suppression property."); | ||
1351 | |||
1352 | if (fIgnoreDependencies) | ||
1353 | { | ||
1354 | // Ignore all dependencies, since the Burn engine already performed the check. | ||
1355 | hr = StrAllocConcatFormattedSecure(psczProperties, L" %ls=ALL", DEPENDENCY_IGNOREDEPENDENCIES); | ||
1356 | ExitOnFailure(hr, "Failed to add the list of dependencies to ignore to the properties."); | ||
1357 | } | ||
1358 | |||
1316 | LExit: | 1359 | LExit: |
1317 | return hr; | 1360 | return hr; |
1318 | } | 1361 | } |
1319 | 1362 | ||
1320 | extern "C" HRESULT MsiEngineConcatProperties( | 1363 | extern "C" HRESULT MsiEngineConcatPackageProperties( |
1321 | __in_ecount(cProperties) BURN_MSIPROPERTY* rgProperties, | 1364 | __in_ecount(cProperties) BURN_MSIPROPERTY* rgProperties, |
1322 | __in DWORD cProperties, | 1365 | __in DWORD cProperties, |
1323 | __in BURN_VARIABLES* pVariables, | 1366 | __in BURN_VARIABLES* pVariables, |
@@ -1379,7 +1422,7 @@ LExit: | |||
1379 | return hr; | 1422 | return hr; |
1380 | } | 1423 | } |
1381 | 1424 | ||
1382 | extern "C" HRESULT MsiEngineCalculateInstallUiLevel( | 1425 | extern "C" HRESULT MsiEnginePlanPackageOptions( |
1383 | __in BOOTSTRAPPER_DISPLAY display, | 1426 | __in BOOTSTRAPPER_DISPLAY display, |
1384 | __in BURN_USER_EXPERIENCE* pUserExperience, | 1427 | __in BURN_USER_EXPERIENCE* pUserExperience, |
1385 | __in LPCWSTR wzPackageId, | 1428 | __in LPCWSTR wzPackageId, |
@@ -1387,11 +1430,13 @@ extern "C" HRESULT MsiEngineCalculateInstallUiLevel( | |||
1387 | __in BOOTSTRAPPER_ACTION_STATE actionState, | 1430 | __in BOOTSTRAPPER_ACTION_STATE actionState, |
1388 | __out BURN_MSI_PROPERTY* pActionMsiProperty, | 1431 | __out BURN_MSI_PROPERTY* pActionMsiProperty, |
1389 | __out INSTALLUILEVEL* pUiLevel, | 1432 | __out INSTALLUILEVEL* pUiLevel, |
1390 | __out BOOL* pfDisableExternalUiHandler | 1433 | __out BOOL* pfDisableExternalUiHandler, |
1434 | __out BOOTSTRAPPER_MSI_FILE_VERSIONING* pFileVersioning | ||
1391 | ) | 1435 | ) |
1392 | { | 1436 | { |
1393 | *pUiLevel = INSTALLUILEVEL_NONE; | 1437 | *pUiLevel = INSTALLUILEVEL_NONE; |
1394 | *pfDisableExternalUiHandler = FALSE; | 1438 | *pfDisableExternalUiHandler = FALSE; |
1439 | *pFileVersioning = BOOTSTRAPPER_MSI_FILE_VERSIONING_MISSING_OR_OLDER; | ||
1395 | 1440 | ||
1396 | if (BOOTSTRAPPER_DISPLAY_FULL == display || | 1441 | if (BOOTSTRAPPER_DISPLAY_FULL == display || |
1397 | BOOTSTRAPPER_DISPLAY_PASSIVE == display) | 1442 | BOOTSTRAPPER_DISPLAY_PASSIVE == display) |
@@ -1406,6 +1451,7 @@ extern "C" HRESULT MsiEngineCalculateInstallUiLevel( | |||
1406 | break; | 1451 | break; |
1407 | case BOOTSTRAPPER_ACTION_STATE_REPAIR: | 1452 | case BOOTSTRAPPER_ACTION_STATE_REPAIR: |
1408 | *pActionMsiProperty = BURN_MSI_PROPERTY_REPAIR; | 1453 | *pActionMsiProperty = BURN_MSI_PROPERTY_REPAIR; |
1454 | *pFileVersioning = BOOTSTRAPPER_MSI_FILE_VERSIONING_MISSING_OR_OLDER_OR_EQUAL; | ||
1409 | break; | 1455 | break; |
1410 | case BOOTSTRAPPER_ACTION_STATE_MODIFY: | 1456 | case BOOTSTRAPPER_ACTION_STATE_MODIFY: |
1411 | *pActionMsiProperty = BURN_MSI_PROPERTY_MODIFY; | 1457 | *pActionMsiProperty = BURN_MSI_PROPERTY_MODIFY; |
@@ -1415,7 +1461,7 @@ extern "C" HRESULT MsiEngineCalculateInstallUiLevel( | |||
1415 | break; | 1461 | break; |
1416 | } | 1462 | } |
1417 | 1463 | ||
1418 | return UserExperienceOnPlanMsiPackage(pUserExperience, wzPackageId, fExecute, actionState, pActionMsiProperty, pUiLevel, pfDisableExternalUiHandler); | 1464 | return UserExperienceOnPlanMsiPackage(pUserExperience, wzPackageId, fExecute, actionState, pActionMsiProperty, pUiLevel, pfDisableExternalUiHandler, pFileVersioning); |
1419 | } | 1465 | } |
1420 | 1466 | ||
1421 | extern "C" void MsiEngineUpdateInstallRegistrationState( | 1467 | extern "C" void MsiEngineUpdateInstallRegistrationState( |
diff --git a/src/burn/engine/msiengine.h b/src/burn/engine/msiengine.h index 87f47f7c..113bf438 100644 --- a/src/burn/engine/msiengine.h +++ b/src/burn/engine/msiengine.h | |||
@@ -70,11 +70,15 @@ HRESULT MsiEngineExecutePackage( | |||
70 | __in LPVOID pvContext, | 70 | __in LPVOID pvContext, |
71 | __out BOOTSTRAPPER_APPLY_RESTART* pRestart | 71 | __out BOOTSTRAPPER_APPLY_RESTART* pRestart |
72 | ); | 72 | ); |
73 | HRESULT MsiEngineConcatActionProperty( | 73 | HRESULT MsiEngineConcatBurnProperties( |
74 | __in BOOTSTRAPPER_ACTION_STATE action, | ||
74 | __in BURN_MSI_PROPERTY actionMsiProperty, | 75 | __in BURN_MSI_PROPERTY actionMsiProperty, |
76 | __in BOOTSTRAPPER_MSI_FILE_VERSIONING fileVersioning, | ||
77 | __in BOOL fMsiPackage, | ||
78 | __in BOOL fFeatureSelectionEnabled, | ||
75 | __deref_out_z LPWSTR* psczProperties | 79 | __deref_out_z LPWSTR* psczProperties |
76 | ); | 80 | ); |
77 | HRESULT MsiEngineConcatProperties( | 81 | HRESULT MsiEngineConcatPackageProperties( |
78 | __in_ecount(cProperties) BURN_MSIPROPERTY* rgProperties, | 82 | __in_ecount(cProperties) BURN_MSIPROPERTY* rgProperties, |
79 | __in DWORD cProperties, | 83 | __in DWORD cProperties, |
80 | __in BURN_VARIABLES* pVariables, | 84 | __in BURN_VARIABLES* pVariables, |
@@ -82,7 +86,7 @@ HRESULT MsiEngineConcatProperties( | |||
82 | __deref_out_z LPWSTR* psczProperties, | 86 | __deref_out_z LPWSTR* psczProperties, |
83 | __in BOOL fObfuscateHiddenVariables | 87 | __in BOOL fObfuscateHiddenVariables |
84 | ); | 88 | ); |
85 | HRESULT MsiEngineCalculateInstallUiLevel( | 89 | HRESULT MsiEnginePlanPackageOptions( |
86 | __in BOOTSTRAPPER_DISPLAY display, | 90 | __in BOOTSTRAPPER_DISPLAY display, |
87 | __in BURN_USER_EXPERIENCE* pUserExperience, | 91 | __in BURN_USER_EXPERIENCE* pUserExperience, |
88 | __in LPCWSTR wzPackageId, | 92 | __in LPCWSTR wzPackageId, |
@@ -90,7 +94,8 @@ HRESULT MsiEngineCalculateInstallUiLevel( | |||
90 | __in BOOTSTRAPPER_ACTION_STATE actionState, | 94 | __in BOOTSTRAPPER_ACTION_STATE actionState, |
91 | __out BURN_MSI_PROPERTY* pActionMsiProperty, | 95 | __out BURN_MSI_PROPERTY* pActionMsiProperty, |
92 | __out INSTALLUILEVEL* pUiLevel, | 96 | __out INSTALLUILEVEL* pUiLevel, |
93 | __out BOOL* pfDisableExternalUiHandler | 97 | __out BOOL* pfDisableExternalUiHandler, |
98 | __out BOOTSTRAPPER_MSI_FILE_VERSIONING* pFileVersioning | ||
94 | ); | 99 | ); |
95 | void MsiEngineUpdateInstallRegistrationState( | 100 | void MsiEngineUpdateInstallRegistrationState( |
96 | __in BURN_EXECUTE_ACTION* pAction, | 101 | __in BURN_EXECUTE_ACTION* pAction, |
diff --git a/src/burn/engine/mspengine.cpp b/src/burn/engine/mspengine.cpp index 3d7b5517..a88d0cb2 100644 --- a/src/burn/engine/mspengine.cpp +++ b/src/burn/engine/mspengine.cpp | |||
@@ -629,16 +629,26 @@ extern "C" HRESULT MspEngineExecutePackage( | |||
629 | } | 629 | } |
630 | 630 | ||
631 | // set up properties | 631 | // set up properties |
632 | hr = MsiEngineConcatProperties(pExecuteAction->mspTarget.pPackage->Msp.rgProperties, pExecuteAction->mspTarget.pPackage->Msp.cProperties, pVariables, fRollback, &sczProperties, FALSE); | 632 | hr = MsiEngineConcatPackageProperties(pExecuteAction->mspTarget.pPackage->Msp.rgProperties, pExecuteAction->mspTarget.pPackage->Msp.cProperties, pVariables, fRollback, &sczProperties, FALSE); |
633 | ExitOnFailure(hr, "Failed to add properties to argument string."); | 633 | ExitOnFailure(hr, "Failed to add properties to argument string."); |
634 | 634 | ||
635 | hr = MsiEngineConcatProperties(pExecuteAction->mspTarget.pPackage->Msp.rgProperties, pExecuteAction->mspTarget.pPackage->Msp.cProperties, pVariables, fRollback, &sczObfuscatedProperties, TRUE); | 635 | hr = MsiEngineConcatPackageProperties(pExecuteAction->mspTarget.pPackage->Msp.rgProperties, pExecuteAction->mspTarget.pPackage->Msp.cProperties, pVariables, fRollback, &sczObfuscatedProperties, TRUE); |
636 | ExitOnFailure(hr, "Failed to add properties to obfuscated argument string."); | 636 | ExitOnFailure(hr, "Failed to add properties to obfuscated argument string."); |
637 | 637 | ||
638 | hr = MsiEngineConcatActionProperty(pExecuteAction->mspTarget.actionMsiProperty, &sczProperties); | 638 | if (BOOTSTRAPPER_ACTION_STATE_UNINSTALL != pExecuteAction->mspTarget.action) |
639 | { | ||
640 | hr = StrAllocConcatFormattedSecure(&sczProperties, L" PATCH=\"%ls\"", sczPatches); | ||
641 | ExitOnFailure(hr, "Failed to add PATCH property to argument string."); | ||
642 | |||
643 | hr = StrAllocConcatFormatted(&sczObfuscatedProperties, L" PATCH=\"%ls\"", sczPatches); | ||
644 | ExitOnFailure(hr, "Failed to add PATCH property to obfuscated argument string."); | ||
645 | } | ||
646 | |||
647 | // Always add Burn properties last. | ||
648 | hr = MsiEngineConcatBurnProperties(pExecuteAction->mspTarget.action, pExecuteAction->mspTarget.actionMsiProperty, pExecuteAction->mspTarget.fileVersioning, FALSE, FALSE, &sczProperties); | ||
639 | ExitOnFailure(hr, "Failed to add action property to argument string."); | 649 | ExitOnFailure(hr, "Failed to add action property to argument string."); |
640 | 650 | ||
641 | hr = MsiEngineConcatActionProperty(pExecuteAction->mspTarget.actionMsiProperty, &sczObfuscatedProperties); | 651 | hr = MsiEngineConcatBurnProperties(pExecuteAction->mspTarget.action, pExecuteAction->mspTarget.actionMsiProperty, pExecuteAction->mspTarget.fileVersioning, FALSE, FALSE, &sczObfuscatedProperties); |
642 | ExitOnFailure(hr, "Failed to add action property to obfuscated argument string."); | 652 | ExitOnFailure(hr, "Failed to add action property to obfuscated argument string."); |
643 | 653 | ||
644 | LogId(REPORT_STANDARD, MSG_APPLYING_PATCH_PACKAGE, pExecuteAction->mspTarget.pPackage->sczId, LoggingActionStateToString(pExecuteAction->mspTarget.action), sczPatches, sczObfuscatedProperties, pExecuteAction->mspTarget.sczTargetProductCode); | 654 | LogId(REPORT_STANDARD, MSG_APPLYING_PATCH_PACKAGE, pExecuteAction->mspTarget.pPackage->sczId, LoggingActionStateToString(pExecuteAction->mspTarget.action), sczPatches, sczObfuscatedProperties, pExecuteAction->mspTarget.sczTargetProductCode); |
@@ -650,27 +660,11 @@ extern "C" HRESULT MspEngineExecutePackage( | |||
650 | { | 660 | { |
651 | case BOOTSTRAPPER_ACTION_STATE_INSTALL: __fallthrough; | 661 | case BOOTSTRAPPER_ACTION_STATE_INSTALL: __fallthrough; |
652 | case BOOTSTRAPPER_ACTION_STATE_REPAIR: | 662 | case BOOTSTRAPPER_ACTION_STATE_REPAIR: |
653 | hr = StrAllocConcatSecure(&sczProperties, L" PATCH=\"", 0); | ||
654 | ExitOnFailure(hr, "Failed to add PATCH property on install."); | ||
655 | |||
656 | hr = StrAllocConcatSecure(&sczProperties, sczPatches, 0); | ||
657 | ExitOnFailure(hr, "Failed to add patches to PATCH property on install."); | ||
658 | |||
659 | hr = StrAllocConcatSecure(&sczProperties, L"\" REBOOT=ReallySuppress", 0); | ||
660 | ExitOnFailure(hr, "Failed to add reboot suppression property on install."); | ||
661 | |||
662 | hr = WiuConfigureProductEx(pExecuteAction->mspTarget.sczTargetProductCode, INSTALLLEVEL_DEFAULT, INSTALLSTATE_DEFAULT, sczProperties, &restart); | 663 | hr = WiuConfigureProductEx(pExecuteAction->mspTarget.sczTargetProductCode, INSTALLLEVEL_DEFAULT, INSTALLSTATE_DEFAULT, sczProperties, &restart); |
663 | ExitOnFailure(hr, "Failed to install MSP package."); | 664 | ExitOnFailure(hr, "Failed to install MSP package."); |
664 | break; | 665 | break; |
665 | 666 | ||
666 | case BOOTSTRAPPER_ACTION_STATE_UNINSTALL: | 667 | case BOOTSTRAPPER_ACTION_STATE_UNINSTALL: |
667 | hr = StrAllocConcatSecure(&sczProperties, L" REBOOT=ReallySuppress", 0); | ||
668 | ExitOnFailure(hr, "Failed to add reboot suppression property on uninstall."); | ||
669 | |||
670 | // Ignore all dependencies, since the Burn engine already performed the check. | ||
671 | hr = StrAllocFormattedSecure(&sczProperties, L"%ls %ls=ALL", sczProperties, DEPENDENCY_IGNOREDEPENDENCIES); | ||
672 | ExitOnFailure(hr, "Failed to add the list of dependencies to ignore to the properties."); | ||
673 | |||
674 | hr = WiuRemovePatches(sczPatches, pExecuteAction->mspTarget.sczTargetProductCode, sczProperties, &restart); | 668 | hr = WiuRemovePatches(sczPatches, pExecuteAction->mspTarget.sczTargetProductCode, sczProperties, &restart); |
675 | ExitOnFailure(hr, "Failed to uninstall MSP package."); | 669 | ExitOnFailure(hr, "Failed to uninstall MSP package."); |
676 | break; | 670 | break; |
@@ -1128,8 +1122,8 @@ static HRESULT PlanTargetProduct( | |||
1128 | hr = StrAllocString(&pAction->mspTarget.sczTargetProductCode, pTargetProduct->wzTargetProductCode, 0); | 1122 | hr = StrAllocString(&pAction->mspTarget.sczTargetProductCode, pTargetProduct->wzTargetProductCode, 0); |
1129 | ExitOnFailure(hr, "Failed to copy target product code."); | 1123 | ExitOnFailure(hr, "Failed to copy target product code."); |
1130 | 1124 | ||
1131 | hr = MsiEngineCalculateInstallUiLevel(display, pUserExperience, pPackage->sczId, !fRollback, pAction->mspTarget.action, | 1125 | hr = MsiEnginePlanPackageOptions(display, pUserExperience, pPackage->sczId, !fRollback, pAction->mspTarget.action, |
1132 | &pAction->mspTarget.actionMsiProperty, &pAction->mspTarget.uiLevel, &pAction->mspTarget.fDisableExternalUiHandler); | 1126 | &pAction->mspTarget.actionMsiProperty, &pAction->mspTarget.uiLevel, &pAction->mspTarget.fDisableExternalUiHandler, &pAction->mspTarget.fileVersioning); |
1133 | ExitOnFailure(hr, "Failed to get msp ui options."); | 1127 | ExitOnFailure(hr, "Failed to get msp ui options."); |
1134 | 1128 | ||
1135 | // If this is a per-machine target product, then the plan needs to be per-machine as well. | 1129 | // If this is a per-machine target product, then the plan needs to be per-machine as well. |
diff --git a/src/burn/engine/plan.cpp b/src/burn/engine/plan.cpp index 58981352..5aad8c9b 100644 --- a/src/burn/engine/plan.cpp +++ b/src/burn/engine/plan.cpp | |||
@@ -2596,7 +2596,7 @@ static void ExecuteActionLog( | |||
2596 | break; | 2596 | break; |
2597 | 2597 | ||
2598 | case BURN_EXECUTE_ACTION_TYPE_MSI_PACKAGE: | 2598 | case BURN_EXECUTE_ACTION_TYPE_MSI_PACKAGE: |
2599 | LogStringLine(PlanDumpLevel, "%ls action[%u]: MSI_PACKAGE package id: %ls, action: %hs, action msi property: %ls, ui level: %u, disable externaluihandler: %ls, log path: %ls, logging attrib: %u", wzBase, iAction, pAction->msiPackage.pPackage->sczId, LoggingActionStateToString(pAction->msiPackage.action), LoggingBurnMsiPropertyToString(pAction->msiPackage.actionMsiProperty), pAction->msiPackage.uiLevel, pAction->msiPackage.fDisableExternalUiHandler ? L"yes" : L"no", pAction->msiPackage.sczLogPath, pAction->msiPackage.dwLoggingAttributes); | 2599 | LogStringLine(PlanDumpLevel, "%ls action[%u]: MSI_PACKAGE package id: %ls, action: %hs, action msi property: %ls, ui level: %u, disable externaluihandler: %hs, file versioning: %hs, log path: %ls, logging attrib: %u", wzBase, iAction, pAction->msiPackage.pPackage->sczId, LoggingActionStateToString(pAction->msiPackage.action), LoggingBurnMsiPropertyToString(pAction->msiPackage.actionMsiProperty), pAction->msiPackage.uiLevel, LoggingBoolToString(pAction->msiPackage.fDisableExternalUiHandler), LoggingMsiFileVersioningToString(pAction->msiPackage.fileVersioning), pAction->msiPackage.sczLogPath, pAction->msiPackage.dwLoggingAttributes); |
2600 | for (DWORD j = 0; j < pAction->msiPackage.pPackage->Msi.cSlipstreamMspPackages; ++j) | 2600 | for (DWORD j = 0; j < pAction->msiPackage.pPackage->Msi.cSlipstreamMspPackages; ++j) |
2601 | { | 2601 | { |
2602 | const BURN_SLIPSTREAM_MSP* pSlipstreamMsp = pAction->msiPackage.pPackage->Msi.rgSlipstreamMsps + j; | 2602 | const BURN_SLIPSTREAM_MSP* pSlipstreamMsp = pAction->msiPackage.pPackage->Msi.rgSlipstreamMsps + j; |
@@ -2605,7 +2605,7 @@ static void ExecuteActionLog( | |||
2605 | break; | 2605 | break; |
2606 | 2606 | ||
2607 | case BURN_EXECUTE_ACTION_TYPE_MSP_TARGET: | 2607 | case BURN_EXECUTE_ACTION_TYPE_MSP_TARGET: |
2608 | LogStringLine(PlanDumpLevel, "%ls action[%u]: MSP_TARGET package id: %ls, action: %hs, target product code: %ls, target per-machine: %ls, action msi property: %ls, ui level: %u, disable externaluihandler: %ls, log path: %ls", wzBase, iAction, pAction->mspTarget.pPackage->sczId, LoggingActionStateToString(pAction->mspTarget.action), pAction->mspTarget.sczTargetProductCode, pAction->mspTarget.fPerMachineTarget ? L"yes" : L"no", LoggingBurnMsiPropertyToString(pAction->mspTarget.actionMsiProperty), pAction->mspTarget.uiLevel, pAction->mspTarget.fDisableExternalUiHandler ? L"yes" : L"no", pAction->mspTarget.sczLogPath); | 2608 | LogStringLine(PlanDumpLevel, "%ls action[%u]: MSP_TARGET package id: %ls, action: %hs, target product code: %ls, target per-machine: %hs, action msi property: %ls, ui level: %u, disable externaluihandler: %hs, file versioning: %hs, log path: %ls", wzBase, iAction, pAction->mspTarget.pPackage->sczId, LoggingActionStateToString(pAction->mspTarget.action), pAction->mspTarget.sczTargetProductCode, LoggingBoolToString(pAction->mspTarget.fPerMachineTarget), LoggingBurnMsiPropertyToString(pAction->mspTarget.actionMsiProperty), pAction->mspTarget.uiLevel, LoggingBoolToString(pAction->mspTarget.fDisableExternalUiHandler), LoggingMsiFileVersioningToString(pAction->mspTarget.fileVersioning), pAction->mspTarget.sczLogPath); |
2609 | for (DWORD j = 0; j < pAction->mspTarget.cOrderedPatches; ++j) | 2609 | for (DWORD j = 0; j < pAction->mspTarget.cOrderedPatches; ++j) |
2610 | { | 2610 | { |
2611 | LogStringLine(PlanDumpLevel, " Patch[%u]: order: %u, msp package id: %ls", j, pAction->mspTarget.rgOrderedPatches[j].pTargetProduct->dwOrder, pAction->mspTarget.rgOrderedPatches[j].pPackage->sczId); | 2611 | LogStringLine(PlanDumpLevel, " Patch[%u]: order: %u, msp package id: %ls", j, pAction->mspTarget.rgOrderedPatches[j].pTargetProduct->dwOrder, pAction->mspTarget.rgOrderedPatches[j].pPackage->sczId); |
diff --git a/src/burn/engine/plan.h b/src/burn/engine/plan.h index b8bb8c3d..b4348cc4 100644 --- a/src/burn/engine/plan.h +++ b/src/burn/engine/plan.h | |||
@@ -175,6 +175,7 @@ typedef struct _BURN_EXECUTE_ACTION | |||
175 | INSTALLUILEVEL uiLevel; | 175 | INSTALLUILEVEL uiLevel; |
176 | BOOL fDisableExternalUiHandler; | 176 | BOOL fDisableExternalUiHandler; |
177 | BOOTSTRAPPER_ACTION_STATE action; | 177 | BOOTSTRAPPER_ACTION_STATE action; |
178 | BOOTSTRAPPER_MSI_FILE_VERSIONING fileVersioning; | ||
178 | 179 | ||
179 | BOOTSTRAPPER_FEATURE_ACTION* rgFeatures; | 180 | BOOTSTRAPPER_FEATURE_ACTION* rgFeatures; |
180 | } msiPackage; | 181 | } msiPackage; |
@@ -190,6 +191,7 @@ typedef struct _BURN_EXECUTE_ACTION | |||
190 | INSTALLUILEVEL uiLevel; | 191 | INSTALLUILEVEL uiLevel; |
191 | BOOL fDisableExternalUiHandler; | 192 | BOOL fDisableExternalUiHandler; |
192 | BOOTSTRAPPER_ACTION_STATE action; | 193 | BOOTSTRAPPER_ACTION_STATE action; |
194 | BOOTSTRAPPER_MSI_FILE_VERSIONING fileVersioning; | ||
193 | 195 | ||
194 | BURN_ORDERED_PATCHES* rgOrderedPatches; | 196 | BURN_ORDERED_PATCHES* rgOrderedPatches; |
195 | DWORD cOrderedPatches; | 197 | DWORD cOrderedPatches; |
diff --git a/src/burn/engine/userexperience.cpp b/src/burn/engine/userexperience.cpp index c974f4d4..2bd6ecaf 100644 --- a/src/burn/engine/userexperience.cpp +++ b/src/burn/engine/userexperience.cpp | |||
@@ -104,7 +104,7 @@ extern "C" HRESULT UserExperienceLoad( | |||
104 | args.pCommand = pCommand; | 104 | args.pCommand = pCommand; |
105 | args.pfnBootstrapperEngineProc = EngineForApplicationProc; | 105 | args.pfnBootstrapperEngineProc = EngineForApplicationProc; |
106 | args.pvBootstrapperEngineProcContext = pEngineContext; | 106 | args.pvBootstrapperEngineProcContext = pEngineContext; |
107 | args.qwEngineAPIVersion = MAKEQWORDVERSION(2021, 8, 10, 0); | 107 | args.qwEngineAPIVersion = MAKEQWORDVERSION(2021, 12, 7, 0); |
108 | 108 | ||
109 | results.cbSize = sizeof(BOOTSTRAPPER_CREATE_RESULTS); | 109 | results.cbSize = sizeof(BOOTSTRAPPER_CREATE_RESULTS); |
110 | 110 | ||
@@ -1896,7 +1896,8 @@ EXTERN_C BAAPI UserExperienceOnPlanMsiPackage( | |||
1896 | __in BOOTSTRAPPER_ACTION_STATE action, | 1896 | __in BOOTSTRAPPER_ACTION_STATE action, |
1897 | __inout BURN_MSI_PROPERTY* pActionMsiProperty, | 1897 | __inout BURN_MSI_PROPERTY* pActionMsiProperty, |
1898 | __inout INSTALLUILEVEL* pUiLevel, | 1898 | __inout INSTALLUILEVEL* pUiLevel, |
1899 | __inout BOOL* pfDisableExternalUiHandler | 1899 | __inout BOOL* pfDisableExternalUiHandler, |
1900 | __inout BOOTSTRAPPER_MSI_FILE_VERSIONING* pFileVersioning | ||
1900 | ) | 1901 | ) |
1901 | { | 1902 | { |
1902 | HRESULT hr = S_OK; | 1903 | HRESULT hr = S_OK; |
@@ -1907,11 +1908,13 @@ EXTERN_C BAAPI UserExperienceOnPlanMsiPackage( | |||
1907 | args.wzPackageId = wzPackageId; | 1908 | args.wzPackageId = wzPackageId; |
1908 | args.fExecute = fExecute; | 1909 | args.fExecute = fExecute; |
1909 | args.action = action; | 1910 | args.action = action; |
1911 | args.recommendedFileVersioning = *pFileVersioning; | ||
1910 | 1912 | ||
1911 | results.cbSize = sizeof(results); | 1913 | results.cbSize = sizeof(results); |
1912 | results.actionMsiProperty = *pActionMsiProperty; | 1914 | results.actionMsiProperty = *pActionMsiProperty; |
1913 | results.uiLevel = *pUiLevel; | 1915 | results.uiLevel = *pUiLevel; |
1914 | results.fDisableExternalUiHandler = *pfDisableExternalUiHandler; | 1916 | results.fDisableExternalUiHandler = *pfDisableExternalUiHandler; |
1917 | results.fileVersioning = args.recommendedFileVersioning; | ||
1915 | 1918 | ||
1916 | hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANMSIPACKAGE, &args, &results); | 1919 | hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANMSIPACKAGE, &args, &results); |
1917 | ExitOnFailure(hr, "BA OnPlanMsiPackage failed."); | 1920 | ExitOnFailure(hr, "BA OnPlanMsiPackage failed."); |
@@ -1923,6 +1926,7 @@ EXTERN_C BAAPI UserExperienceOnPlanMsiPackage( | |||
1923 | *pActionMsiProperty = results.actionMsiProperty; | 1926 | *pActionMsiProperty = results.actionMsiProperty; |
1924 | *pUiLevel = results.uiLevel; | 1927 | *pUiLevel = results.uiLevel; |
1925 | *pfDisableExternalUiHandler = results.fDisableExternalUiHandler; | 1928 | *pfDisableExternalUiHandler = results.fDisableExternalUiHandler; |
1929 | *pFileVersioning = results.fileVersioning; | ||
1926 | 1930 | ||
1927 | LExit: | 1931 | LExit: |
1928 | return hr; | 1932 | return hr; |
diff --git a/src/burn/engine/userexperience.h b/src/burn/engine/userexperience.h index c2219f7e..2493569b 100644 --- a/src/burn/engine/userexperience.h +++ b/src/burn/engine/userexperience.h | |||
@@ -440,7 +440,8 @@ BAAPI UserExperienceOnPlanMsiPackage( | |||
440 | __in BOOTSTRAPPER_ACTION_STATE action, | 440 | __in BOOTSTRAPPER_ACTION_STATE action, |
441 | __inout BURN_MSI_PROPERTY* pActionMsiProperty, | 441 | __inout BURN_MSI_PROPERTY* pActionMsiProperty, |
442 | __inout INSTALLUILEVEL* pUiLevel, | 442 | __inout INSTALLUILEVEL* pUiLevel, |
443 | __inout BOOL* pfDisableExternalUiHandler | 443 | __inout BOOL* pfDisableExternalUiHandler, |
444 | __inout BOOTSTRAPPER_MSI_FILE_VERSIONING* pFileVersioning | ||
444 | ); | 445 | ); |
445 | BAAPI UserExperienceOnPlannedPackage( | 446 | BAAPI UserExperienceOnPlannedPackage( |
446 | __in BURN_USER_EXPERIENCE* pUserExperience, | 447 | __in BURN_USER_EXPERIENCE* pUserExperience, |