aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/burn/engine/apply.cpp23
-rw-r--r--src/burn/engine/detect.cpp11
-rw-r--r--src/burn/engine/engine.mc2
-rw-r--r--src/burn/engine/externalengine.cpp2
-rw-r--r--src/burn/engine/splashscreen.cpp6
-rw-r--r--src/libs/dutil/WixToolset.DUtil/thmutil.cpp2
-rw-r--r--src/test/burn/TestData/ExePackageTests/CustomExitCodeExePackage/CustomExitCodeExePackage.wixproj17
-rw-r--r--src/test/burn/TestData/ExePackageTests/CustomExitCodeExePackage/CustomExitCodeExePackage.wxs34
-rw-r--r--src/test/burn/TestData/Manual/BafThmutilTesting/theme/BafThmUtilTestingTheme.xml2
-rw-r--r--src/test/burn/TestData/Manual/BafThmutilTesting/theme/BafThmUtilTestingThemeLoose.xml2
-rw-r--r--src/test/burn/TestData/Manual/BundleA/ManualTests.txt10
-rw-r--r--src/test/burn/TestData/UpdateBundleTests/BundleBv1/FeedBv2.0_wronghash.xml54
-rw-r--r--src/test/burn/WixTestTools/MSIExec.cs8
-rw-r--r--src/test/burn/WixToolsetTest.BurnE2E/ExePackageTests.cs26
-rw-r--r--src/test/burn/WixToolsetTest.BurnE2E/UpdateBundleTests.cs36
15 files changed, 223 insertions, 12 deletions
diff --git a/src/burn/engine/apply.cpp b/src/burn/engine/apply.cpp
index e67208b4..8fbaa76e 100644
--- a/src/burn/engine/apply.cpp
+++ b/src/burn/engine/apply.cpp
@@ -2547,6 +2547,11 @@ static HRESULT DoExecuteAction(
2547 } while (fRetry && *pRestart < BOOTSTRAPPER_APPLY_RESTART_INITIATED); 2547 } while (fRetry && *pRestart < BOOTSTRAPPER_APPLY_RESTART_INITIATED);
2548 2548
2549LExit: 2549LExit:
2550 if (*pRestart < restart)
2551 {
2552 *pRestart = restart;
2553 }
2554
2550 return hr; 2555 return hr;
2551} 2556}
2552 2557
@@ -2561,6 +2566,7 @@ static HRESULT DoRollbackActions(
2561 DWORD iCheckpoint = 0; 2566 DWORD iCheckpoint = 0;
2562 BOOL fRetryIgnored = FALSE; 2567 BOOL fRetryIgnored = FALSE;
2563 BOOL fSuspendIgnored = FALSE; 2568 BOOL fSuspendIgnored = FALSE;
2569 BOOTSTRAPPER_APPLY_RESTART restart = BOOTSTRAPPER_APPLY_RESTART_NONE;
2564 2570
2565 pContext->fRollback = TRUE; 2571 pContext->fRollback = TRUE;
2566 2572
@@ -2598,7 +2604,8 @@ static HRESULT DoRollbackActions(
2598 continue; 2604 continue;
2599 } 2605 }
2600 2606
2601 BOOTSTRAPPER_APPLY_RESTART restart = BOOTSTRAPPER_APPLY_RESTART_NONE; 2607 restart = BOOTSTRAPPER_APPLY_RESTART_NONE;
2608
2602 switch (pRollbackAction->type) 2609 switch (pRollbackAction->type)
2603 { 2610 {
2604 case BURN_EXECUTE_ACTION_TYPE_CHECKPOINT: 2611 case BURN_EXECUTE_ACTION_TYPE_CHECKPOINT:
@@ -2674,6 +2681,11 @@ static HRESULT DoRollbackActions(
2674 } 2681 }
2675 2682
2676LExit: 2683LExit:
2684 if (*pRestart < restart)
2685 {
2686 *pRestart = restart;
2687 }
2688
2677 return hr; 2689 return hr;
2678} 2690}
2679 2691
@@ -2791,6 +2803,7 @@ static HRESULT DoRestoreRelatedBundleActions(
2791 HRESULT hr = S_OK; 2803 HRESULT hr = S_OK;
2792 BOOL fRetryIgnored = FALSE; 2804 BOOL fRetryIgnored = FALSE;
2793 BOOL fSuspendIgnored = FALSE; 2805 BOOL fSuspendIgnored = FALSE;
2806 BOOTSTRAPPER_APPLY_RESTART restart = BOOTSTRAPPER_APPLY_RESTART_NONE;
2794 2807
2795 // execute restore related bundle actions 2808 // execute restore related bundle actions
2796 for (DWORD i = 0; i < pEngineState->plan.cRestoreRelatedBundleActions; ++i) 2809 for (DWORD i = 0; i < pEngineState->plan.cRestoreRelatedBundleActions; ++i)
@@ -2804,7 +2817,8 @@ static HRESULT DoRestoreRelatedBundleActions(
2804 pContext->wzExecutingPackageId = NULL; 2817 pContext->wzExecutingPackageId = NULL;
2805 pContext->fAbandonedProcess = FALSE; 2818 pContext->fAbandonedProcess = FALSE;
2806 2819
2807 BOOTSTRAPPER_APPLY_RESTART restart = BOOTSTRAPPER_APPLY_RESTART_NONE; 2820 restart = BOOTSTRAPPER_APPLY_RESTART_NONE;
2821
2808 switch (pRestoreRelatedBundleAction->type) 2822 switch (pRestoreRelatedBundleAction->type)
2809 { 2823 {
2810 case BURN_EXECUTE_ACTION_TYPE_RELATED_BUNDLE: 2824 case BURN_EXECUTE_ACTION_TYPE_RELATED_BUNDLE:
@@ -2824,6 +2838,11 @@ static HRESULT DoRestoreRelatedBundleActions(
2824 } 2838 }
2825 2839
2826LExit: 2840LExit:
2841 if (*pRestart < restart)
2842 {
2843 *pRestart = restart;
2844 }
2845
2827 return hr; 2846 return hr;
2828} 2847}
2829 2848
diff --git a/src/burn/engine/detect.cpp b/src/burn/engine/detect.cpp
index fcd1c966..f573e259 100644
--- a/src/burn/engine/detect.cpp
+++ b/src/burn/engine/detect.cpp
@@ -399,18 +399,23 @@ static HRESULT DetectAtomFeedUpdate(
399 { 399 {
400 APPLICATION_UPDATE_ENTRY* pAppUpdateEntry = &pApupChain->rgEntries[i]; 400 APPLICATION_UPDATE_ENTRY* pAppUpdateEntry = &pApupChain->rgEntries[i];
401 APPLICATION_UPDATE_ENCLOSURE* pEnclosure = pAppUpdateEntry->rgEnclosures; 401 APPLICATION_UPDATE_ENCLOSURE* pEnclosure = pAppUpdateEntry->rgEnclosures;
402 LPCWSTR wzHash = L"";
403 BOOTSTRAPPER_UPDATE_HASH_TYPE hashType = BOOTSTRAPPER_UPDATE_HASH_TYPE_NONE;
402 404
403 if (pEnclosure && pEnclosure->rgbDigest && *pEnclosure->rgbDigest) 405 if (pEnclosure && pEnclosure->rgbDigest && APUP_HASH_ALGORITHM_SHA512 == pEnclosure->digestAlgorithm)
404 { 406 {
405 hr = StrAllocHexEncode(pEnclosure->rgbDigest, pEnclosure->cbDigest, &sczHash); 407 hr = StrAllocHexEncode(pEnclosure->rgbDigest, pEnclosure->cbDigest, &sczHash);
406 ExitOnFailure(hr, "Failed to encode hash as string."); 408 ExitOnFailure(hr, "Failed to encode hash as string.");
409
410 wzHash = sczHash;
411 hashType = BOOTSTRAPPER_UPDATE_HASH_TYPE_SHA512;
407 } 412 }
408 413
409 hr = UserExperienceOnDetectUpdate(pUX, 414 hr = UserExperienceOnDetectUpdate(pUX,
410 pEnclosure ? pEnclosure->wzUrl : NULL, 415 pEnclosure ? pEnclosure->wzUrl : NULL,
411 pEnclosure ? pEnclosure->dw64Size : 0, 416 pEnclosure ? pEnclosure->dw64Size : 0,
412 sczHash ? sczHash : L"", 417 wzHash,
413 pEnclosure ? pEnclosure->digestAlgorithm == APUP_HASH_ALGORITHM_SHA512 ? BOOTSTRAPPER_UPDATE_HASH_TYPE_SHA512 : BOOTSTRAPPER_UPDATE_HASH_TYPE_NONE : BOOTSTRAPPER_UPDATE_HASH_TYPE_NONE, 418 hashType,
414 pAppUpdateEntry->pVersion, 419 pAppUpdateEntry->pVersion,
415 pAppUpdateEntry->wzTitle, 420 pAppUpdateEntry->wzTitle,
416 pAppUpdateEntry->wzSummary, 421 pAppUpdateEntry->wzSummary,
diff --git a/src/burn/engine/engine.mc b/src/burn/engine/engine.mc
index d965d4ad..cebd1325 100644
--- a/src/burn/engine/engine.mc
+++ b/src/burn/engine/engine.mc
@@ -1006,7 +1006,7 @@ MessageId=366
1006Severity=Success 1006Severity=Success
1007SymbolicName=MSG_EXECUTE_PACKAGE_PROCESS_EXITED 1007SymbolicName=MSG_EXECUTE_PACKAGE_PROCESS_EXITED
1008Language=English 1008Language=English
1009The process for package: %1!ls! exited with code: %2!u!. The exit code has been translated to type: %3!hs! and restart: %4!hs!. 1009The process for package: %1!ls! exited with code: 0x%2!x!. The exit code has been translated to type: %3!hs! and restart: %4!hs!.
1010. 1010.
1011 1011
1012MessageId=370 1012MessageId=370
diff --git a/src/burn/engine/externalengine.cpp b/src/burn/engine/externalengine.cpp
index e18b9486..5e540c2a 100644
--- a/src/burn/engine/externalengine.cpp
+++ b/src/burn/engine/externalengine.cpp
@@ -296,7 +296,7 @@ HRESULT ExternalEngineSetUpdate(
296 { 296 {
297 ExitFunction1(hr = E_INVALIDARG); 297 ExitFunction1(hr = E_INVALIDARG);
298 } 298 }
299 else if (BOOTSTRAPPER_UPDATE_HASH_TYPE_SHA512 == hashType && (!wzHash || !*wzHash || SHA512_HASH_LEN != lstrlenW(wzHash))) 299 else if (BOOTSTRAPPER_UPDATE_HASH_TYPE_SHA512 == hashType && (!wzHash || !*wzHash || SHA512_HASH_LEN * 2 != lstrlenW(wzHash)))
300 { 300 {
301 ExitFunction1(hr = E_INVALIDARG); 301 ExitFunction1(hr = E_INVALIDARG);
302 } 302 }
diff --git a/src/burn/engine/splashscreen.cpp b/src/burn/engine/splashscreen.cpp
index d8618feb..b9dc9f55 100644
--- a/src/burn/engine/splashscreen.cpp
+++ b/src/burn/engine/splashscreen.cpp
@@ -221,6 +221,11 @@ LExit:
221 ::DeleteObject(splashScreenInfo.hBitmap); 221 ::DeleteObject(splashScreenInfo.hBitmap);
222 } 222 }
223 223
224 if (splashScreenInfo.hwndPrevious)
225 {
226 ::PostMessageW(splashScreenInfo.hwndPrevious, WM_CLOSE, 0, 0);
227 }
228
224 return hr; 229 return hr;
225} 230}
226 231
@@ -261,6 +266,7 @@ static LRESULT CALLBACK WndProc(
261 return 1; 266 return 1;
262 267
263 case WM_ENTERIDLE: 268 case WM_ENTERIDLE:
269 case WM_MOVING:
264 lres = ::DefWindowProcW(hWnd, uMsg, wParam, lParam); 270 lres = ::DefWindowProcW(hWnd, uMsg, wParam, lParam);
265 271
266 // We had to create our own splash screen so that Windows would automatically transfer focus from the other process's splash screen. 272 // We had to create our own splash screen so that Windows would automatically transfer focus from the other process's splash screen.
diff --git a/src/libs/dutil/WixToolset.DUtil/thmutil.cpp b/src/libs/dutil/WixToolset.DUtil/thmutil.cpp
index 2341025c..05f7c098 100644
--- a/src/libs/dutil/WixToolset.DUtil/thmutil.cpp
+++ b/src/libs/dutil/WixToolset.DUtil/thmutil.cpp
@@ -4287,8 +4287,6 @@ static HRESULT StopBillboard(
4287 4287
4288 if (THEME_CONTROL_TYPE_BILLBOARD == pControl->type) 4288 if (THEME_CONTROL_TYPE_BILLBOARD == pControl->type)
4289 { 4289 {
4290 ThemeControlEnable(pControl, FALSE);
4291
4292 if (::KillTimer(pTheme->hwndParent, idEvent)) 4290 if (::KillTimer(pTheme->hwndParent, idEvent))
4293 { 4291 {
4294 hr = S_OK; 4292 hr = S_OK;
diff --git a/src/test/burn/TestData/ExePackageTests/CustomExitCodeExePackage/CustomExitCodeExePackage.wixproj b/src/test/burn/TestData/ExePackageTests/CustomExitCodeExePackage/CustomExitCodeExePackage.wixproj
new file mode 100644
index 00000000..403f3320
--- /dev/null
+++ b/src/test/burn/TestData/ExePackageTests/CustomExitCodeExePackage/CustomExitCodeExePackage.wixproj
@@ -0,0 +1,17 @@
1<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
2<Project Sdk="WixToolset.Sdk">
3 <PropertyGroup>
4 <OutputType>Bundle</OutputType>
5 <UpgradeCode>{9BB4F6D3-4EE3-40BF-879F-90E78440EAE8}</UpgradeCode>
6 </PropertyGroup>
7 <ItemGroup>
8 <Compile Include="..\..\Templates\Bundle.wxs" Link="Bundle.wxs" />
9 </ItemGroup>
10 <ItemGroup>
11 <ProjectReference Include="..\..\TestBA\TestBAWixlib\testbawixlib.wixproj" />
12 </ItemGroup>
13 <ItemGroup>
14 <PackageReference Include="WixToolset.Bal.wixext" />
15 <PackageReference Include="WixToolset.NetFx.wixext" />
16 </ItemGroup>
17</Project> \ No newline at end of file
diff --git a/src/test/burn/TestData/ExePackageTests/CustomExitCodeExePackage/CustomExitCodeExePackage.wxs b/src/test/burn/TestData/ExePackageTests/CustomExitCodeExePackage/CustomExitCodeExePackage.wxs
new file mode 100644
index 00000000..a02e48d1
--- /dev/null
+++ b/src/test/burn/TestData/ExePackageTests/CustomExitCodeExePackage/CustomExitCodeExePackage.wxs
@@ -0,0 +1,34 @@
1<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
2
3<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal">
4 <Fragment>
5 <PackageGroup Id="BundlePackages">
6 <ExePackage Id="TestExe" Cache="remove" PerMachine="yes"
7 DetectCondition="" Permanent="yes" InstallArguments="/ec [EXEEXITCODE]">
8 <PayloadGroupRef Id="TestExePayloads" />
9
10 <ExitCode Value="0" Behavior="error" />
11 <ExitCode Value="3" Behavior="scheduleReboot" />
12 <ExitCode Value="4" Behavior="forceReboot" />
13 <ExitCode Value="5" Behavior="errorScheduleReboot" />
14 <ExitCode Value="-2147024891" Behavior="errorScheduleReboot" />
15 <ExitCode Value="6" Behavior="errorForceReboot" />
16 <ExitCode Value="-2147024890" Behavior="errorForceReboot" />
17 <ExitCode Value="3010" Behavior="error" />
18 <ExitCode Value="-2147021886" Behavior="error" />
19 <ExitCode Value="3011" Behavior="error" />
20 <ExitCode Value="-2147021885" Behavior="error" />
21 <ExitCode Value="1641" Behavior="error" />
22 <ExitCode Value="-2147023255" Behavior="error" />
23 <ExitCode Value="3017" Behavior="error" />
24 <ExitCode Value="-2147021879" Behavior="error" />
25 <ExitCode Value="3018" Behavior="error" />
26 <ExitCode Value="-2147021878" Behavior="error" />
27 <ExitCode Value="-2147483647" Behavior="error" />
28 <ExitCode Value="-2147483648" Behavior="error" />
29 <ExitCode Behavior="success" />
30 </ExePackage>
31 </PackageGroup>
32 <Variable Name="EXEEXITCODE" bal:Overridable="yes" Value="1" />
33 </Fragment>
34</Wix>
diff --git a/src/test/burn/TestData/Manual/BafThmutilTesting/theme/BafThmUtilTestingTheme.xml b/src/test/burn/TestData/Manual/BafThmutilTesting/theme/BafThmUtilTestingTheme.xml
index 4c117506..c890d7df 100644
--- a/src/test/burn/TestData/Manual/BafThmutilTesting/theme/BafThmUtilTestingTheme.xml
+++ b/src/test/burn/TestData/Manual/BafThmutilTesting/theme/BafThmUtilTestingTheme.xml
@@ -132,7 +132,7 @@ There are currently four states for a button: default, focus, hover, and selecte
132 </Page> 132 </Page>
133 <Page Name="Billboard"> 133 <Page Name="Billboard">
134 <Label X="6" Y="6" Width="-6" Height="43" FontId="Default"> 134 <Label X="6" Y="6" Width="-6" Height="43" FontId="Default">
135 This page has a billboard. It loops between two panels every 1.5 seconds. 135 This page has a billboard. It loops between two panels every 1.5 seconds. Press Back to go to another page, and then come back and make sure it still loops.
136 </Label> 136 </Label>
137 <Billboard Name="FirstBillboard" X="11" Y="59" Width="-11" Height="-39" Interval="1500" Loop="yes"> 137 <Billboard Name="FirstBillboard" X="11" Y="59" Width="-11" Height="-39" Interval="1500" Loop="yes">
138 <Panel> 138 <Panel>
diff --git a/src/test/burn/TestData/Manual/BafThmutilTesting/theme/BafThmUtilTestingThemeLoose.xml b/src/test/burn/TestData/Manual/BafThmutilTesting/theme/BafThmUtilTestingThemeLoose.xml
index b2b0dcb3..37757e64 100644
--- a/src/test/burn/TestData/Manual/BafThmutilTesting/theme/BafThmUtilTestingThemeLoose.xml
+++ b/src/test/burn/TestData/Manual/BafThmutilTesting/theme/BafThmUtilTestingThemeLoose.xml
@@ -132,7 +132,7 @@ There are currently four states for a button: default, focus, hover, and selecte
132 </Page> 132 </Page>
133 <Page Name="Billboard"> 133 <Page Name="Billboard">
134 <Label X="6" Y="6" Width="-6" Height="43" FontId="Default"> 134 <Label X="6" Y="6" Width="-6" Height="43" FontId="Default">
135 This page has a billboard. It loops between two panels every 1.5 seconds. 135 This page has a billboard. It loops between two panels every 1.5 seconds. Press Back to go to another page, and then come back and make sure it still loops.
136 </Label> 136 </Label>
137 <Billboard Name="FirstBillboard" X="11" Y="59" Width="-11" Height="-39" Interval="1500" Loop="yes"> 137 <Billboard Name="FirstBillboard" X="11" Y="59" Width="-11" Height="-39" Interval="1500" Loop="yes">
138 <Panel> 138 <Panel>
diff --git a/src/test/burn/TestData/Manual/BundleA/ManualTests.txt b/src/test/burn/TestData/Manual/BundleA/ManualTests.txt
index b8c6e74d..351f2c1f 100644
--- a/src/test/burn/TestData/Manual/BundleA/ManualTests.txt
+++ b/src/test/burn/TestData/Manual/BundleA/ManualTests.txt
@@ -152,3 +152,13 @@ CanRestartFromUnelevatedPerUserBundleWithShutdownPrivilege
152======================================= 152=======================================
153 153
154(10. Uninstall the bundle) 154(10. Uninstall the bundle)
155
156CanShowSplashScreenQuicklyAndCacheThousandsOfFilesInLinearTime
157
1581. Run BundleB.exe.
1592. The splash screen should come up immediately (less than 1 second).
1603. After the wixstdba UI comes up, make sure the splash screen was closed (it might be hiding underneath windows).
1614. Click Install (accept elevation).
1625. This bundle contains 10000 loose files which needs to be cached, which used to take over 30 minutes. The exact timing can be different on different machines, but it should be closer to 30 seconds.
1636. Click Close.
164(7. Uninstall the bundle)
diff --git a/src/test/burn/TestData/UpdateBundleTests/BundleBv1/FeedBv2.0_wronghash.xml b/src/test/burn/TestData/UpdateBundleTests/BundleBv1/FeedBv2.0_wronghash.xml
new file mode 100644
index 00000000..82ce6837
--- /dev/null
+++ b/src/test/burn/TestData/UpdateBundleTests/BundleBv1/FeedBv2.0_wronghash.xml
@@ -0,0 +1,54 @@
1<?xml version='1.0' ?>
2<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3
4
5<feed xmlns="http://www.w3.org/2005/Atom" xmlns:as="http://appsyndication.org/2006/appsyn">
6 <title type="text">BundleB v2.0</title>
7 <subtitle type="text">Bundle Subtitle.</subtitle>
8 <as:application type="application/exe">1116353B-7C6E-4C29-BFA1-D4A972CD421D</as:application>
9 <updated>2014-07-14T12:39:00.000Z</updated>
10 <id>http://localhost:9999/e2e/BundleB/feed</id>
11 <link rel="self" type="application/atom+xml" href="http://localhost:9999/e2e/BundleB/feed"/>
12 <generator version="0.1">manual build</generator>
13 <entry>
14 <title>Bundle v2.0</title>
15 <id>v2.0</id>
16 <author>
17 <name>Bundle_Author</name>
18 <uri>http://mycompany.com/software</uri>
19 <email>Bundle_Author@mycompany.com</email>
20 </author>
21 <link rel="alternate" href="http://www.mycompany.com/content/view/software"/>
22 <link rel="enclosure" href="http://localhost:9999/e2e/BundleB/2.0/BundleB.exe" length="0" type="application/octet-stream">
23 <as:name>this hash is supposed to be wrong but has a tiny chance of actually being right</as:name>
24 <as:digest algorithm="sha512">00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000</as:digest>
25 </link>
26 <content type="html">
27 &lt;p&gt;Change list:&lt;/p&gt;&lt;ul&gt;
28 &lt;li&gt;Updated release.&lt;/li&gt;
29 &lt;/ul&gt;
30 </content>
31 <as:upgrade version="1.0" />
32 <as:version>2.0.0.0</as:version>
33 <updated>2014-11-10T12:39:00.000Z</updated>
34 </entry>
35 <entry>
36 <title>Bundle v1.0</title>
37 <id>v1.0</id>
38 <author>
39 <name>Bundle_Author</name>
40 <uri>http://mycompany.com/software</uri>
41 <email>Bundle_Author@mycompany.com</email>
42 </author>
43 <link rel="alternate" href="http://www.mycompany.com/content/view/software"/>
44 <link rel="enclosure" href="http://localhost:9999/e2e/BundleB/1.0/BundleB.exe" length="0" type="application/octet-stream"/>
45 <content type="html">
46 &lt;p&gt;Change list:&lt;/p&gt;&lt;ul&gt;
47 &lt;li&gt;Initial release.&lt;/li&gt;
48 &lt;/ul&gt;
49 </content>
50 <as:upgrade version="1.0.0.0-preview" />
51 <as:version>1.0.0.0</as:version>
52 <updated>2014-11-09T12:39:00.000Z</updated>
53 </entry>
54</feed>
diff --git a/src/test/burn/WixTestTools/MSIExec.cs b/src/test/burn/WixTestTools/MSIExec.cs
index 5f57da7b..a905ec5a 100644
--- a/src/test/burn/WixTestTools/MSIExec.cs
+++ b/src/test/burn/WixTestTools/MSIExec.cs
@@ -666,7 +666,13 @@ namespace WixTestTools
666 /// A restart is required to complete the install. This message is indicative of a success. 666 /// A restart is required to complete the install. This message is indicative of a success.
667 /// This does not include installs where the ForceReboot action is run. 667 /// This does not include installs where the ForceReboot action is run.
668 /// </summary> 668 /// </summary>
669 ERROR_SUCCESS_REBOOT_REQUIRED = 3010 669 ERROR_SUCCESS_REBOOT_REQUIRED = 3010,
670
671 /// <summary>
672 /// ERROR_SUCCESS_REBOOT_REQUIRED 3017
673 /// The requested operation failed. A system reboot is required to roll back changes made.
674 /// </summary>
675 ERROR_FAIL_REBOOT_REQUIRED = 3017,
670 } 676 }
671 677
672 /// <summary> 678 /// <summary>
diff --git a/src/test/burn/WixToolsetTest.BurnE2E/ExePackageTests.cs b/src/test/burn/WixToolsetTest.BurnE2E/ExePackageTests.cs
index e76461f3..42301f30 100644
--- a/src/test/burn/WixToolsetTest.BurnE2E/ExePackageTests.cs
+++ b/src/test/burn/WixToolsetTest.BurnE2E/ExePackageTests.cs
@@ -143,6 +143,32 @@ namespace WixToolsetTest.BurnE2E
143 } 143 }
144 144
145 [RuntimeFact] 145 [RuntimeFact]
146 public void CanUseLargeCustomExitCode()
147 {
148 var customExitCodeExePackageBundle = this.CreateBundleInstaller(@"CustomExitCodeExePackage");
149
150 var installLogPath = customExitCodeExePackageBundle.Install(5, "EXEEXITCODE=-2147024891");
151 customExitCodeExePackageBundle.VerifyUnregisteredAndRemovedFromPackageCache();
152
153 Assert.True(LogVerifier.MessageInLogFile(installLogPath, "TestExe.exe\" /ec -2147024891"));
154 Assert.True(LogVerifier.MessageInLogFile(installLogPath, "The process for package: TestExe exited with code: 0x80070005. The exit code has been translated to type: ErrorScheduleReboot and restart: Required."));
155 Assert.True(LogVerifier.MessageInLogFile(installLogPath, "Applied execute package: TestExe, result: 0x80070005, restart: Required"));
156 Assert.True(LogVerifier.MessageInLogFile(installLogPath, "Apply complete, result: 0x80070005, restart: Required, ba requested restart: No"));
157 }
158
159 [RuntimeFact]
160 public void CanUseWildcardCustomExitCode()
161 {
162 var customExitCodeExePackageBundle = this.CreateBundleInstaller(@"CustomExitCodeExePackage");
163
164 var installLogPath = customExitCodeExePackageBundle.Install((int)MSIExec.MSIExecReturnCode.SUCCESS, "EXEEXITCODE=1");
165 customExitCodeExePackageBundle.VerifyUnregisteredAndRemovedFromPackageCache();
166
167 Assert.True(LogVerifier.MessageInLogFile(installLogPath, "TestExe.exe\" /ec 1"));
168 Assert.True(LogVerifier.MessageInLogFile(installLogPath, "The process for package: TestExe exited with code: 0x1. The exit code has been translated to type: Success and restart: None."));
169 }
170
171 [RuntimeFact]
146 public void CanInstallAndUninstallPerUserArpEntryExePackage() 172 public void CanInstallAndUninstallPerUserArpEntryExePackage()
147 { 173 {
148 var perUserArpEntryExePackageBundle = this.CreateBundleInstaller(@"PerUserArpEntryExePackage"); 174 var perUserArpEntryExePackageBundle = this.CreateBundleInstaller(@"PerUserArpEntryExePackage");
diff --git a/src/test/burn/WixToolsetTest.BurnE2E/UpdateBundleTests.cs b/src/test/burn/WixToolsetTest.BurnE2E/UpdateBundleTests.cs
index df666833..f7ec8647 100644
--- a/src/test/burn/WixToolsetTest.BurnE2E/UpdateBundleTests.cs
+++ b/src/test/burn/WixToolsetTest.BurnE2E/UpdateBundleTests.cs
@@ -242,5 +242,41 @@ namespace WixToolsetTest.BurnE2E
242 packageBv1.VerifyInstalled(false); 242 packageBv1.VerifyInstalled(false);
243 packageBv2.VerifyInstalled(false); 243 packageBv2.VerifyInstalled(false);
244 } 244 }
245
246 // Installs bundle Bv1.0 then attempts an update to bundle Bv2.0 during modify (server exists, v2.0 feed with wrong hash).
247 [RuntimeFact]
248 public void CanBlockWrongUpdateBundleFromDownloadInsteadOfModify()
249 {
250 var packageBv1 = this.CreatePackageInstaller("PackageBv1");
251 var packageBv2 = this.CreatePackageInstaller("PackageBv2");
252 var bundleBv1 = this.CreateBundleInstaller("BundleBv1");
253 var bundleBv2 = this.CreateBundleInstaller("BundleBv2");
254 var webServer = this.CreateWebServer();
255
256 webServer.AddFiles(new Dictionary<string, string>
257 {
258 { "/BundleB/feed", Path.Combine(this.TestContext.TestDataFolder, "FeedBv2.0_wronghash.xml") },
259 { "/BundleB/2.0/BundleB.exe", bundleBv2.Bundle },
260 });
261 webServer.Start();
262
263 packageBv1.VerifyInstalled(false);
264 packageBv2.VerifyInstalled(false);
265
266 bundleBv1.Install();
267 bundleBv1.VerifyRegisteredAndInPackageCache();
268
269 packageBv1.VerifyInstalled(true);
270 packageBv2.VerifyInstalled(false);
271
272 // Run the v1 bundle requesting an update bundle.
273 bundleBv1.Modify(unchecked((int)0x80091007), arguments: "-checkupdate");
274
275 bundleBv1.VerifyRegisteredAndInPackageCache();
276 bundleBv2.VerifyUnregisteredAndRemovedFromPackageCache();
277
278 packageBv1.VerifyInstalled(true);
279 packageBv2.VerifyInstalled(false);
280 }
245 } 281 }
246} 282}