From a52ce13b7153a1bf2c28c2ca5112612f31c1fa14 Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Tue, 6 Jul 2021 20:17:31 +0000 Subject: [PATCH 01/48] Add mu opt out code --- assets/wix/Product.wxs | 74 +++++++++++++++++++++++++++++++++++++----- 1 file changed, 66 insertions(+), 8 deletions(-) diff --git a/assets/wix/Product.wxs b/assets/wix/Product.wxs index b4a69fa8e25..6b37380a0f9 100644 --- a/assets/wix/Product.wxs +++ b/assets/wix/Product.wxs @@ -84,6 +84,16 @@ Execute="deferred" Return="ignore" Impersonate="no" /> + + Installed AND NOT UPGRADINGPRODUCTCODE @@ -93,6 +103,9 @@ + + + @@ -176,9 +189,18 @@ + + + + + + + + + @@ -288,7 +310,7 @@ - + @@ -300,23 +322,56 @@ - + The application is distributed under the MIT license.]]> - + Please review the ThirdPartyNotices.txt]]> - - - - + + + + 1 + + + + + + + + + + + + + + + + + + + See the Microsoft Update FAQ.]]> + + + Read the Microsoft Update Priacy Statement.]]> + + + + + + + 1 + + + + @@ -325,6 +380,7 @@ - WixUI_WelcomeDlg - WixUI_InstallDirDlg - ExplorerContextMenuDialog + - MuDialog - WixUI_VerifyReadyDlg - WixUI_DiskCostDlg Maintenance dialog sequence: @@ -364,7 +420,9 @@ Installed AND PATCH 1 - 1 + 1 + 1 + 1 1 1 From a01db86984af55c665a1633438ba4100df416e1f Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Tue, 6 Jul 2021 21:17:05 +0000 Subject: [PATCH 02/48] fix key --- assets/wix/Product.wxs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/assets/wix/Product.wxs b/assets/wix/Product.wxs index 6b37380a0f9..49bd3e3093c 100644 --- a/assets/wix/Product.wxs +++ b/assets/wix/Product.wxs @@ -148,6 +148,7 @@ + @@ -192,7 +193,7 @@ - + From bd59708ed5b31fee6b8e5d95b0c8fb35e588eeda Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Tue, 6 Jul 2021 21:39:44 +0000 Subject: [PATCH 03/48] fix dup key --- assets/wix/Product.wxs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/assets/wix/Product.wxs b/assets/wix/Product.wxs index 49bd3e3093c..8b323ea9eee 100644 --- a/assets/wix/Product.wxs +++ b/assets/wix/Product.wxs @@ -193,15 +193,12 @@ - + - - - From e1a4ce7b79fb4acd065c3cee933ea1cd15234415 Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Tue, 6 Jul 2021 22:01:53 +0000 Subject: [PATCH 04/48] fix radio --- assets/wix/Product.wxs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/assets/wix/Product.wxs b/assets/wix/Product.wxs index 8b323ea9eee..101768a2d9d 100644 --- a/assets/wix/Product.wxs +++ b/assets/wix/Product.wxs @@ -340,6 +340,7 @@ + @@ -347,11 +348,10 @@ - - + - - + + From a777c866af8cc4d7beee2de0426606e02995557b Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Tue, 6 Jul 2021 22:41:29 +0000 Subject: [PATCH 05/48] fix dialgo formatting --- assets/wix/Product.wxs | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/assets/wix/Product.wxs b/assets/wix/Product.wxs index 101768a2d9d..180f47f86b9 100644 --- a/assets/wix/Product.wxs +++ b/assets/wix/Product.wxs @@ -308,7 +308,7 @@ - + @@ -320,17 +320,17 @@ - + The application is distributed under the MIT license.]]> - + Please review the ThirdPartyNotices.txt]]> - - - - + + + + 1 @@ -341,12 +341,12 @@ - + - - + + @@ -361,10 +361,10 @@ Read the Microsoft Update Priacy Statement.]]> - - - - + + + + 1 From 276cf72fb29ffacb1570a81f70d8a931a891e7f1 Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Tue, 6 Jul 2021 23:40:40 +0000 Subject: [PATCH 06/48] Split the to action out --- assets/wix/Product.wxs | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/assets/wix/Product.wxs b/assets/wix/Product.wxs index 180f47f86b9..8a73b62a4ef 100644 --- a/assets/wix/Product.wxs +++ b/assets/wix/Product.wxs @@ -104,7 +104,7 @@ - + @@ -341,6 +341,7 @@ + @@ -348,12 +349,8 @@ - - - - - - + + See the Microsoft Update FAQ.]]> From 2da199866d8a4786829184d76ae0645bb39d6dd2 Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Tue, 6 Jul 2021 23:47:31 +0000 Subject: [PATCH 07/48] fix property names --- assets/wix/Product.wxs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/wix/Product.wxs b/assets/wix/Product.wxs index 8a73b62a4ef..08329716905 100644 --- a/assets/wix/Product.wxs +++ b/assets/wix/Product.wxs @@ -349,8 +349,8 @@ - - + + See the Microsoft Update FAQ.]]> From 52fd3b80e7fbd7a085c88183a9d96d29563e5760 Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Wed, 7 Jul 2021 00:36:06 +0000 Subject: [PATCH 08/48] fix formatting second try --- assets/wix/Product.wxs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/assets/wix/Product.wxs b/assets/wix/Product.wxs index 08329716905..0587f72e53c 100644 --- a/assets/wix/Product.wxs +++ b/assets/wix/Product.wxs @@ -349,12 +349,12 @@ - - - + + + See the Microsoft Update FAQ.]]> - + Read the Microsoft Update Priacy Statement.]]> From ce91ad8175ed8abaf38de4abb1031b7f1ceffddd Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Wed, 7 Jul 2021 00:39:21 +0000 Subject: [PATCH 09/48] use our own fwlink --- assets/wix/Product.wxs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/wix/Product.wxs b/assets/wix/Product.wxs index 0587f72e53c..db74565707c 100644 --- a/assets/wix/Product.wxs +++ b/assets/wix/Product.wxs @@ -355,7 +355,7 @@ See the Microsoft Update FAQ.]]> - Read the Microsoft Update Priacy Statement.]]> + Read the Microsoft Update Priacy Statement.]]> From 513cef8d1304e4be9249ad6a5ea40693d11839a0 Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Wed, 7 Jul 2021 16:28:21 +0000 Subject: [PATCH 10/48] fix formatting refinement --- assets/wix/Product.wxs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/assets/wix/Product.wxs b/assets/wix/Product.wxs index db74565707c..573e314cb76 100644 --- a/assets/wix/Product.wxs +++ b/assets/wix/Product.wxs @@ -349,12 +349,12 @@ - - - + + + See the Microsoft Update FAQ.]]> - + Read the Microsoft Update Priacy Statement.]]> From b130918e5b9490a01c7b48e3d3b3c922a1771bf0 Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Wed, 7 Jul 2021 18:42:27 +0000 Subject: [PATCH 11/48] change to fix functionality issue --- assets/wix/Product.wxs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/wix/Product.wxs b/assets/wix/Product.wxs index 573e314cb76..2b8e9280f5d 100644 --- a/assets/wix/Product.wxs +++ b/assets/wix/Product.wxs @@ -192,7 +192,7 @@ - + From ff4b171432e3b0a4e664e597fd824d3e64728ca1 Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Wed, 7 Jul 2021 18:42:37 +0000 Subject: [PATCH 12/48] Add tests --- test/packaging/windows/msi.tests.ps1 | 72 ++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) diff --git a/test/packaging/windows/msi.tests.ps1 b/test/packaging/windows/msi.tests.ps1 index d58357a1cd1..c0c26c07a08 100644 --- a/test/packaging/windows/msi.tests.ps1 +++ b/test/packaging/windows/msi.tests.ps1 @@ -14,6 +14,15 @@ Describe -Name "Windows MSI" -Fixture { return (([Security.Principal.WindowsIdentity]::GetCurrent()).Groups -contains "S-1-5-32-544") } + function Test-IsMuEnabled { + $sm = (New-Object -ComObject Microsoft.Update.ServiceManager) + $mu = $sm.Services | Where-Object { $_.ServiceId -eq '7971f918-a847-4430-9279-4a52d1efe18d' } + if ($mu) { + return $true + } + return $false + } + function Invoke-Msiexec { param( [Parameter(ParameterSetName = 'Install', Mandatory)] @@ -55,6 +64,7 @@ Describe -Name "Windows MSI" -Fixture { $msiX64Path = $env:PsMsiX64Path $channel = $env:PSMsiChannel $runtime = $env:PSMsiRuntime + $muEnabled = Test-IsMuEnabled # Get any existing powershell in the path $beforePath = @(([System.Environment]::GetEnvironmentVariable('PATH', 'MACHINE')) -split ';' | @@ -82,6 +92,34 @@ Describe -Name "Windows MSI" -Fixture { } } + Context "Enable_MU disabled" { + It "MSI should install without error" -Skip:(!(Test-Elevated)) { + if($muEnabled) { + Set-ItResult -Skipped -Because "MU already enabled" + } + { + Invoke-MsiExec -Install -MsiPath $msiX64Path -Properties @{Enable_MU = 0} + } | Should -Not -Throw + } + + It "MU should be disabled" -Skip:(!(Test-Elevated)) { + if($muEnabled) { + Set-ItResult -Skipped -Because "MU already enabled" + } + + Test-IsMuEnabled | Should -BeFalse -Because "MU should not have been enabled" + } + + It "MSI should uninstall without error" -Skip:(!(Test-Elevated)) { + if($muEnabled) { + Set-ItResult -Skipped -Because "MU already enabled" + } + { + Invoke-MsiExec -Uninstall -MsiPath $msiX64Path + } | Should -Not -Throw + } + } + Context "Upgrade code" { BeforeAll { Write-Verbose "cr-$channel-$runtime" -Verbose @@ -165,6 +203,40 @@ Describe -Name "Windows MSI" -Fixture { Invoke-MsiExec -Uninstall -MsiPath $msiX64Path } | Should -Not -Throw } + + It "UseMU should be 1" -Skip:(!(Test-Elevated)) { + $useMu = Get-ItemPropertyValue -Path HKLM:\SOFTWARE\Microsoft\PowerShellCore\ -Name UseMU + + $useMu | Should -Be 1 + } + + It "MU should be enabled" -Skip:(!(Test-Elevated)) { + if($muEnabled) { + Set-ItResult -Skipped -Because "MU already enabled" + } + + Test-IsMuEnabled | Should -BeTrue -Because "MU should have been enabled" + } + } + + Context "USE_MU disabled" { + It "MSI should install without error" -Skip:(!(Test-Elevated)) { + { + Invoke-MsiExec -Install -MsiPath $msiX64Path -Properties @{USE_MU = 0} + } | Should -Not -Throw + } + + It "UseMU should be 0" -Skip:(!(Test-Elevated)) { + $useMu = Get-ItemPropertyValue -Path HKLM:\SOFTWARE\Microsoft\PowerShellCore\ -Name UseMU + + $useMu | Should -Be 0 + } + + It "MSI should uninstall without error" -Skip:(!(Test-Elevated)) { + { + Invoke-MsiExec -Uninstall -MsiPath $msiX64Path + } | Should -Not -Throw + } } Context "Add Path enabled" { From 17db1a4ff62937263973fd981233d32f008cbc98 Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Wed, 7 Jul 2021 22:14:27 +0000 Subject: [PATCH 13/48] turn off strict mode --- test/packaging/windows/msi.tests.ps1 | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/packaging/windows/msi.tests.ps1 b/test/packaging/windows/msi.tests.ps1 index c0c26c07a08..97bc4168358 100644 --- a/test/packaging/windows/msi.tests.ps1 +++ b/test/packaging/windows/msi.tests.ps1 @@ -3,6 +3,7 @@ Describe -Name "Windows MSI" -Fixture { BeforeAll { + Set-StrictMode -Off function Test-Elevated { [CmdletBinding()] [OutputType([bool])] @@ -81,9 +82,15 @@ Describe -Name "Windows MSI" -Fixture { } $uploadedLog = $false } + + AfterAll { + Set-StrictMode -Verbose 3.0 + } + BeforeEach { $error.Clear() } + AfterEach { if ($error.Count -ne 0 -and !$uploadedLog) { Copy-Item -Path $msiLog -Destination $env:temp -Force From a8a60c2d7e6cdf9b3e5ac9ec81b6df9a0995c963 Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Wed, 7 Jul 2021 23:28:21 +0000 Subject: [PATCH 14/48] fix re-enabling strict mode --- test/packaging/windows/msi.tests.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/packaging/windows/msi.tests.ps1 b/test/packaging/windows/msi.tests.ps1 index 97bc4168358..3b0491ee72d 100644 --- a/test/packaging/windows/msi.tests.ps1 +++ b/test/packaging/windows/msi.tests.ps1 @@ -84,7 +84,7 @@ Describe -Name "Windows MSI" -Fixture { } AfterAll { - Set-StrictMode -Verbose 3.0 + Set-StrictMode -Version 3.0 } BeforeEach { From 74fc742216fff5fec567ae99e636a9a456355aa2 Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Wed, 7 Jul 2021 23:36:18 +0000 Subject: [PATCH 15/48] try to fix tests --- test/packaging/windows/msi.tests.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/packaging/windows/msi.tests.ps1 b/test/packaging/windows/msi.tests.ps1 index 3b0491ee72d..7d36355488a 100644 --- a/test/packaging/windows/msi.tests.ps1 +++ b/test/packaging/windows/msi.tests.ps1 @@ -194,7 +194,7 @@ Describe -Name "Windows MSI" -Fixture { Context "Add Path disabled" { It "MSI should install without error" -Skip:(!(Test-Elevated)) { { - Invoke-MsiExec -Install -MsiPath $msiX64Path -Properties @{ADD_PATH = 0} + Invoke-MsiExec -Install -MsiPath $msiX64Path -Properties @{ADD_PATH = 0; USE_MU = 1; ENABLE_MU = 1} } | Should -Not -Throw } From ec441270b14e348154a5c501d2c378994c204510 Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Thu, 8 Jul 2021 18:03:10 +0000 Subject: [PATCH 16/48] try to fix tests --- assets/wix/Product.wxs | 5 +++-- test/packaging/windows/msi.tests.ps1 | 7 +++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/assets/wix/Product.wxs b/assets/wix/Product.wxs index 2b8e9280f5d..26a43f0eaba 100644 --- a/assets/wix/Product.wxs +++ b/assets/wix/Product.wxs @@ -191,9 +191,10 @@ + USE_MU=1 - - + + diff --git a/test/packaging/windows/msi.tests.ps1 b/test/packaging/windows/msi.tests.ps1 index 7d36355488a..f63f2c9b890 100644 --- a/test/packaging/windows/msi.tests.ps1 +++ b/test/packaging/windows/msi.tests.ps1 @@ -55,6 +55,7 @@ Describe -Name "Windows MSI" -Fixture { } $argumentList = "$switch $MsiPath /quiet /l*vx $msiLog $additionalOptions" + Write-Verbose -Message "running msiexec $argumentList" -Verbose $msiExecProcess = Start-Process msiexec.exe -Wait -ArgumentList $argumentList -NoNewWindow -PassThru if ($msiExecProcess.ExitCode -ne 0) { $exitCode = $msiExecProcess.ExitCode @@ -212,7 +213,8 @@ Describe -Name "Windows MSI" -Fixture { } It "UseMU should be 1" -Skip:(!(Test-Elevated)) { - $useMu = Get-ItemPropertyValue -Path HKLM:\SOFTWARE\Microsoft\PowerShellCore\ -Name UseMU + $useMu = 0 + $useMu = Get-ItemPropertyValue -Path HKLM:\SOFTWARE\Microsoft\PowerShellCore\ -Name UseMU -ErrorAction Ignore $useMu | Should -Be 1 } @@ -234,7 +236,8 @@ Describe -Name "Windows MSI" -Fixture { } It "UseMU should be 0" -Skip:(!(Test-Elevated)) { - $useMu = Get-ItemPropertyValue -Path HKLM:\SOFTWARE\Microsoft\PowerShellCore\ -Name UseMU + $useMu = 0 + $useMu = Get-ItemPropertyValue -Path HKLM:\SOFTWARE\Microsoft\PowerShellCore\ -Name UseMU -ErrorAction Ignore $useMu | Should -Be 0 } From 54934288ea3ccf6f7560b1d6653af546cd0fc061 Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Thu, 8 Jul 2021 18:37:03 +0000 Subject: [PATCH 17/48] continue when we have build or test error --- .vsts-ci/windows/templates/windows-packaging.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.vsts-ci/windows/templates/windows-packaging.yml b/.vsts-ci/windows/templates/windows-packaging.yml index 19d2be32618..3ed6cf7e451 100644 --- a/.vsts-ci/windows/templates/windows-packaging.yml +++ b/.vsts-ci/windows/templates/windows-packaging.yml @@ -32,4 +32,5 @@ jobs: Import-Module .\tools\ci.psm1 New-CodeCoverageAndTestPackage Invoke-CIFinish -Runtime win7-${{ parameters.architecture }} -channel ${{ parameters.channel }} + errorActionPreference: continue displayName: Build and Test Package From 9529737bc64689be5c7c62b0d0aecd25a221dd50 Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Thu, 8 Jul 2021 18:46:08 +0000 Subject: [PATCH 18/48] capture MSI log on failure --- test/packaging/windows/msi.tests.ps1 | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/test/packaging/windows/msi.tests.ps1 b/test/packaging/windows/msi.tests.ps1 index f63f2c9b890..670888c7b87 100644 --- a/test/packaging/windows/msi.tests.ps1 +++ b/test/packaging/windows/msi.tests.ps1 @@ -92,14 +92,6 @@ Describe -Name "Windows MSI" -Fixture { $error.Clear() } - AfterEach { - if ($error.Count -ne 0 -and !$uploadedLog) { - Copy-Item -Path $msiLog -Destination $env:temp -Force - Write-Verbose "MSI log is at $env:temp\msilog.txt" -Verbose - $uploadedLog = $true - } - } - Context "Enable_MU disabled" { It "MSI should install without error" -Skip:(!(Test-Elevated)) { if($muEnabled) { @@ -213,10 +205,16 @@ Describe -Name "Windows MSI" -Fixture { } It "UseMU should be 1" -Skip:(!(Test-Elevated)) { - $useMu = 0 - $useMu = Get-ItemPropertyValue -Path HKLM:\SOFTWARE\Microsoft\PowerShellCore\ -Name UseMU -ErrorAction Ignore + try { + $useMu = 0 + $useMu = Get-ItemPropertyValue -Path HKLM:\SOFTWARE\Microsoft\PowerShellCore\ -Name UseMU -ErrorAction Ignore - $useMu | Should -Be 1 + $useMu | Should -Be 1 + } + catch { + Send-VstsLogFile -Path $msiLog + throw + } } It "MU should be enabled" -Skip:(!(Test-Elevated)) { From c10dd6a4ac573b8495880dc8f1650f88a7ef5aa4 Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Thu, 8 Jul 2021 19:15:28 +0000 Subject: [PATCH 19/48] Revert "continue when we have build or test error" This reverts commit 54934288ea3ccf6f7560b1d6653af546cd0fc061. --- .vsts-ci/windows/templates/windows-packaging.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.vsts-ci/windows/templates/windows-packaging.yml b/.vsts-ci/windows/templates/windows-packaging.yml index 3ed6cf7e451..19d2be32618 100644 --- a/.vsts-ci/windows/templates/windows-packaging.yml +++ b/.vsts-ci/windows/templates/windows-packaging.yml @@ -32,5 +32,4 @@ jobs: Import-Module .\tools\ci.psm1 New-CodeCoverageAndTestPackage Invoke-CIFinish -Runtime win7-${{ parameters.architecture }} -channel ${{ parameters.channel }} - errorActionPreference: continue displayName: Build and Test Package From 522445454064f5da92d94fcc0bf90446480d24e6 Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Thu, 8 Jul 2021 19:15:43 +0000 Subject: [PATCH 20/48] always push artifacts --- tools/ci.psm1 | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/tools/ci.psm1 b/tools/ci.psm1 index afdf5b81bab..0272cb42f6b 100644 --- a/tools/ci.psm1 +++ b/tools/ci.psm1 @@ -546,23 +546,21 @@ function Invoke-CIFinish Start-PSBuild -Restore -Runtime win-arm64 -PSModuleRestore -Configuration 'Release' -ReleaseTag $releaseTag $arm64Package = Start-PSPackage -Type zip -WindowsRuntime win-arm64 -ReleaseTag $releaseTag -SkipReleaseChecks $artifacts.Add($arm64Package) - + } + finally { $pushedAllArtifacts = $true $artifacts | ForEach-Object { Write-Log -Message "Pushing $_ as CI artifact" - if(Test-Path $_) - { + if (Test-Path $_) { Push-Artifact -Path $_ -Name 'artifacts' - } - else - { + } else { $pushedAllArtifacts = $false Write-Warning "Artifact $_ does not exist." } } - if(!$pushedAllArtifacts) - { + + if (!$pushedAllArtifacts) { throw "Some artifacts did not exist!" } } From 3bb79306457239de7445c050b8bd8af6750fa97f Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Thu, 8 Jul 2021 20:14:57 +0000 Subject: [PATCH 21/48] don't uninstall before executing tests --- test/packaging/windows/msi.tests.ps1 | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/test/packaging/windows/msi.tests.ps1 b/test/packaging/windows/msi.tests.ps1 index 670888c7b87..0403a2daad9 100644 --- a/test/packaging/windows/msi.tests.ps1 +++ b/test/packaging/windows/msi.tests.ps1 @@ -198,12 +198,6 @@ Describe -Name "Windows MSI" -Fixture { $psPath | Should -BeNullOrEmpty } - It "MSI should uninstall without error" -Skip:(!(Test-Elevated)) { - { - Invoke-MsiExec -Uninstall -MsiPath $msiX64Path - } | Should -Not -Throw - } - It "UseMU should be 1" -Skip:(!(Test-Elevated)) { try { $useMu = 0 @@ -224,6 +218,12 @@ Describe -Name "Windows MSI" -Fixture { Test-IsMuEnabled | Should -BeTrue -Because "MU should have been enabled" } + + It "MSI should uninstall without error" -Skip:(!(Test-Elevated)) { + { + Invoke-MsiExec -Uninstall -MsiPath $msiX64Path + } | Should -Not -Throw + } } Context "USE_MU disabled" { @@ -235,7 +235,7 @@ Describe -Name "Windows MSI" -Fixture { It "UseMU should be 0" -Skip:(!(Test-Elevated)) { $useMu = 0 - $useMu = Get-ItemPropertyValue -Path HKLM:\SOFTWARE\Microsoft\PowerShellCore\ -Name UseMU -ErrorAction Ignore + $useMu = Get-ItemPropertyValue -Path HKLM:\SOFTWARE\Microsoft\PowerShellCore\ -Name UseMU -ErrorAction SilentlyContinue $useMu | Should -Be 0 } From 0e13ff03c3f364dffdc6a03ac74197d94eeda7d4 Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Thu, 8 Jul 2021 20:19:02 +0000 Subject: [PATCH 22/48] add uploading logs to other tests --- test/packaging/windows/msi.tests.ps1 | 34 ++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/test/packaging/windows/msi.tests.ps1 b/test/packaging/windows/msi.tests.ps1 index 0403a2daad9..f6e2e0df118 100644 --- a/test/packaging/windows/msi.tests.ps1 +++ b/test/packaging/windows/msi.tests.ps1 @@ -24,6 +24,20 @@ Describe -Name "Windows MSI" -Fixture { return $false } + function Invoke-TestAndUploadLogOnFailure { + param ( + [scriptblock] $Test + ) + + try { + & $Test + } + catch { + Send-VstsLogFile -Path $msiLog + throw + } + } + function Invoke-Msiexec { param( [Parameter(ParameterSetName = 'Install', Mandatory)] @@ -199,16 +213,12 @@ Describe -Name "Windows MSI" -Fixture { } It "UseMU should be 1" -Skip:(!(Test-Elevated)) { - try { + Invoke-TestAndUploadLogOnFailure -Test { $useMu = 0 - $useMu = Get-ItemPropertyValue -Path HKLM:\SOFTWARE\Microsoft\PowerShellCore\ -Name UseMU -ErrorAction Ignore + $useMu = Get-ItemPropertyValue -Path HKLM:\SOFTWARE\Microsoft\PowerShellCore\ -Name UseMU -ErrorAction SilentlyContinue $useMu | Should -Be 1 } - catch { - Send-VstsLogFile -Path $msiLog - throw - } } It "MU should be enabled" -Skip:(!(Test-Elevated)) { @@ -216,7 +226,9 @@ Describe -Name "Windows MSI" -Fixture { Set-ItResult -Skipped -Because "MU already enabled" } - Test-IsMuEnabled | Should -BeTrue -Because "MU should have been enabled" + Invoke-TestAndUploadLogOnFailure -Test { + Test-IsMuEnabled | Should -BeTrue -Because "MU should have been enabled" + } } It "MSI should uninstall without error" -Skip:(!(Test-Elevated)) { @@ -234,10 +246,12 @@ Describe -Name "Windows MSI" -Fixture { } It "UseMU should be 0" -Skip:(!(Test-Elevated)) { - $useMu = 0 - $useMu = Get-ItemPropertyValue -Path HKLM:\SOFTWARE\Microsoft\PowerShellCore\ -Name UseMU -ErrorAction SilentlyContinue + Invoke-TestAndUploadLogOnFailure -Test { + $useMu = 0 + $useMu = Get-ItemPropertyValue -Path HKLM:\SOFTWARE\Microsoft\PowerShellCore\ -Name UseMU -ErrorAction SilentlyContinue - $useMu | Should -Be 0 + $useMu | Should -Be 0 + } } It "MSI should uninstall without error" -Skip:(!(Test-Elevated)) { From 6b35a3bc97fbce97b151a8cbb77603b145c35c21 Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Thu, 8 Jul 2021 20:45:51 +0000 Subject: [PATCH 23/48] make sure you can tell which file is which --- test/tools/Modules/HelpersCommon/HelpersCommon.psm1 | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/test/tools/Modules/HelpersCommon/HelpersCommon.psm1 b/test/tools/Modules/HelpersCommon/HelpersCommon.psm1 index 0071f16fcdc..894a85ff14d 100644 --- a/test/tools/Modules/HelpersCommon/HelpersCommon.psm1 +++ b/test/tools/Modules/HelpersCommon/HelpersCommon.psm1 @@ -219,22 +219,21 @@ function Send-VstsLogFile { } } + $newName = ([System.Io.Path]::GetRandomFileName() + "-$LogName.txt") if($Contents) { - $logFile = Join-Path -Path $logFolder -ChildPath ([System.Io.Path]::GetRandomFileName() + "-$LogName.txt") - $name = Split-Path -Leaf -Path $logFile + $logFile = Join-Path -Path $logFolder -ChildPath $newName $Contents | Out-File -path $logFile -Encoding ascii } else { - $name = Split-Path -Leaf -Path $path - $logFile = Join-Path -Path $logFolder -ChildPath ([System.Io.Path]::GetRandomFileName() + '-' + $name) + $logFile = Join-Path -Path $logFolder -ChildPath $newName Copy-Item -Path $Path -Destination $logFile } - Write-Host "##vso[artifact.upload containerfolder=$name;artifactname=$name]$logFile" - Write-Verbose "Log file captured as $name" -Verbose + Write-Host "##vso[artifact.upload containerfolder=$newName;artifactname=$newName]$logFile" + Write-Verbose "Log file captured as $newName" -Verbose } # Tests if the Linux or macOS user is root From 1c14ed23500c16a013c057b10e5e96c8b3eee3f6 Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Thu, 8 Jul 2021 20:46:06 +0000 Subject: [PATCH 24/48] fix up test cases --- test/packaging/windows/msi.tests.ps1 | 34 +++++++++++++++++++++++----- 1 file changed, 28 insertions(+), 6 deletions(-) diff --git a/test/packaging/windows/msi.tests.ps1 b/test/packaging/windows/msi.tests.ps1 index f6e2e0df118..05836a0e072 100644 --- a/test/packaging/windows/msi.tests.ps1 +++ b/test/packaging/windows/msi.tests.ps1 @@ -38,6 +38,15 @@ Describe -Name "Windows MSI" -Fixture { } } + function Get-UseMU { + $useMu = 0 + try { + $useMu = Get-ItemPropertyValue -Path HKLM:\SOFTWARE\Microsoft\PowerShellCore\ -Name UseMU -ErrorAction SilentlyContinue + } catch {} + + return $useMu + } + function Invoke-Msiexec { param( [Parameter(ParameterSetName = 'Install', Mandatory)] @@ -124,6 +133,13 @@ Describe -Name "Windows MSI" -Fixture { Test-IsMuEnabled | Should -BeFalse -Because "MU should not have been enabled" } + It "UseMU should be 1" -Skip:(!(Test-Elevated)) { + Invoke-TestAndUploadLogOnFailure -Test { + $useMu = Get-UseMU + $useMu | Should -Be 1 + } + } + It "MSI should uninstall without error" -Skip:(!(Test-Elevated)) { if($muEnabled) { Set-ItResult -Skipped -Because "MU already enabled" @@ -214,9 +230,7 @@ Describe -Name "Windows MSI" -Fixture { It "UseMU should be 1" -Skip:(!(Test-Elevated)) { Invoke-TestAndUploadLogOnFailure -Test { - $useMu = 0 - $useMu = Get-ItemPropertyValue -Path HKLM:\SOFTWARE\Microsoft\PowerShellCore\ -Name UseMU -ErrorAction SilentlyContinue - + $useMu = Get-UseMU $useMu | Should -Be 1 } } @@ -247,13 +261,21 @@ Describe -Name "Windows MSI" -Fixture { It "UseMU should be 0" -Skip:(!(Test-Elevated)) { Invoke-TestAndUploadLogOnFailure -Test { - $useMu = 0 - $useMu = Get-ItemPropertyValue -Path HKLM:\SOFTWARE\Microsoft\PowerShellCore\ -Name UseMU -ErrorAction SilentlyContinue - + $useMu = Get-UseMU $useMu | Should -Be 0 } } + It "MU should be enabled" -Skip:(!(Test-Elevated)) { + if($muEnabled) { + Set-ItResult -Skipped -Because "MU already enabled" + } + + Invoke-TestAndUploadLogOnFailure -Test { + Test-IsMuEnabled | Should -BeTrue -Because "MU should have been enabled" + } + } + It "MSI should uninstall without error" -Skip:(!(Test-Elevated)) { { Invoke-MsiExec -Uninstall -MsiPath $msiX64Path From c02fb38955e2ddb06f5a64f7bdc84fe0a24fa0ab Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Fri, 9 Jul 2021 01:15:45 +0000 Subject: [PATCH 25/48] Enabling MU is not working in --- test/packaging/windows/msi.tests.ps1 | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/test/packaging/windows/msi.tests.ps1 b/test/packaging/windows/msi.tests.ps1 index 05836a0e072..3c8e80e7d44 100644 --- a/test/packaging/windows/msi.tests.ps1 +++ b/test/packaging/windows/msi.tests.ps1 @@ -125,7 +125,8 @@ Describe -Name "Windows MSI" -Fixture { } | Should -Not -Throw } - It "MU should be disabled" -Skip:(!(Test-Elevated)) { + # Doesn't work in azDO hosts + It "MU should be disabled" -Pending { if($muEnabled) { Set-ItResult -Skipped -Because "MU already enabled" } @@ -235,7 +236,8 @@ Describe -Name "Windows MSI" -Fixture { } } - It "MU should be enabled" -Skip:(!(Test-Elevated)) { + # Doesn't work in azDO hosts + It "MU should be enabled" -Pending { if($muEnabled) { Set-ItResult -Skipped -Because "MU already enabled" } @@ -266,7 +268,8 @@ Describe -Name "Windows MSI" -Fixture { } } - It "MU should be enabled" -Skip:(!(Test-Elevated)) { + # Doesn't work in azDO hosts + It "MU should be enabled" -Pending { if($muEnabled) { Set-ItResult -Skipped -Because "MU already enabled" } From e48f93756939b3a6e979c4eeb9b23767387220b1 Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Fri, 9 Jul 2021 01:31:58 +0000 Subject: [PATCH 26/48] remove debug message --- test/packaging/windows/msi.tests.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/packaging/windows/msi.tests.ps1 b/test/packaging/windows/msi.tests.ps1 index 3c8e80e7d44..1939513b64e 100644 --- a/test/packaging/windows/msi.tests.ps1 +++ b/test/packaging/windows/msi.tests.ps1 @@ -78,7 +78,7 @@ Describe -Name "Windows MSI" -Fixture { } $argumentList = "$switch $MsiPath /quiet /l*vx $msiLog $additionalOptions" - Write-Verbose -Message "running msiexec $argumentList" -Verbose + Write-Verbose -Message "running msiexec $argumentList" $msiExecProcess = Start-Process msiexec.exe -Wait -ArgumentList $argumentList -NoNewWindow -PassThru if ($msiExecProcess.ExitCode -ne 0) { $exitCode = $msiExecProcess.ExitCode From 43caff8dc43c62ab5f675708eae3330ed90b3543 Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Fri, 9 Jul 2021 01:42:36 +0000 Subject: [PATCH 27/48] fix x86 --- test/packaging/windows/msi.tests.ps1 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/packaging/windows/msi.tests.ps1 b/test/packaging/windows/msi.tests.ps1 index 1939513b64e..9c2d703adf4 100644 --- a/test/packaging/windows/msi.tests.ps1 +++ b/test/packaging/windows/msi.tests.ps1 @@ -40,8 +40,13 @@ Describe -Name "Windows MSI" -Fixture { function Get-UseMU { $useMu = 0 + $key = 'HKLM:\SOFTWARE\Microsoft\PowerShellCore\' + if ($runtime -like '*x86*') { + $key = 'HKLM:\SOFTWARE\Wow6432Node\Microsoft\PowerShellCore\' + } + try { - $useMu = Get-ItemPropertyValue -Path HKLM:\SOFTWARE\Microsoft\PowerShellCore\ -Name UseMU -ErrorAction SilentlyContinue + $useMu = Get-ItemPropertyValue -Path $key -Name UseMU -ErrorAction SilentlyContinue } catch {} return $useMu From 2ea55f432043c757e67d8bb45674d8bafbe6272e Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Tue, 13 Jul 2021 18:49:20 +0000 Subject: [PATCH 28/48] add mu warning dialog --- assets/wix/Product.wxs | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/assets/wix/Product.wxs b/assets/wix/Product.wxs index 26a43f0eaba..cab225dbfaf 100644 --- a/assets/wix/Product.wxs +++ b/assets/wix/Product.wxs @@ -367,6 +367,20 @@ + + + + + Without Microsoft Update enabled, you will need to use another update solution like WSUS or SCCM in order to receive automatic updates. Are you sure you want to continue? + + + 1 + + + 0 + + + @@ -377,6 +391,7 @@ - WixUI_InstallDirDlg - ExplorerContextMenuDialog - MuDialog + - MuWarningDlg - WixUI_VerifyReadyDlg - WixUI_DiskCostDlg Maintenance dialog sequence: @@ -418,7 +433,8 @@ 1 1 1 - 1 + + 1 1 1 From d4fe879d1ee1c21088890c806810a6db718e59e1 Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Tue, 13 Jul 2021 18:50:57 +0000 Subject: [PATCH 29/48] remove tests that don't work --- test/packaging/windows/msi.tests.ps1 | 58 ---------------------------- 1 file changed, 58 deletions(-) diff --git a/test/packaging/windows/msi.tests.ps1 b/test/packaging/windows/msi.tests.ps1 index 9c2d703adf4..9d1c218c4c0 100644 --- a/test/packaging/windows/msi.tests.ps1 +++ b/test/packaging/windows/msi.tests.ps1 @@ -120,42 +120,6 @@ Describe -Name "Windows MSI" -Fixture { $error.Clear() } - Context "Enable_MU disabled" { - It "MSI should install without error" -Skip:(!(Test-Elevated)) { - if($muEnabled) { - Set-ItResult -Skipped -Because "MU already enabled" - } - { - Invoke-MsiExec -Install -MsiPath $msiX64Path -Properties @{Enable_MU = 0} - } | Should -Not -Throw - } - - # Doesn't work in azDO hosts - It "MU should be disabled" -Pending { - if($muEnabled) { - Set-ItResult -Skipped -Because "MU already enabled" - } - - Test-IsMuEnabled | Should -BeFalse -Because "MU should not have been enabled" - } - - It "UseMU should be 1" -Skip:(!(Test-Elevated)) { - Invoke-TestAndUploadLogOnFailure -Test { - $useMu = Get-UseMU - $useMu | Should -Be 1 - } - } - - It "MSI should uninstall without error" -Skip:(!(Test-Elevated)) { - if($muEnabled) { - Set-ItResult -Skipped -Because "MU already enabled" - } - { - Invoke-MsiExec -Uninstall -MsiPath $msiX64Path - } | Should -Not -Throw - } - } - Context "Upgrade code" { BeforeAll { Write-Verbose "cr-$channel-$runtime" -Verbose @@ -241,17 +205,6 @@ Describe -Name "Windows MSI" -Fixture { } } - # Doesn't work in azDO hosts - It "MU should be enabled" -Pending { - if($muEnabled) { - Set-ItResult -Skipped -Because "MU already enabled" - } - - Invoke-TestAndUploadLogOnFailure -Test { - Test-IsMuEnabled | Should -BeTrue -Because "MU should have been enabled" - } - } - It "MSI should uninstall without error" -Skip:(!(Test-Elevated)) { { Invoke-MsiExec -Uninstall -MsiPath $msiX64Path @@ -273,17 +226,6 @@ Describe -Name "Windows MSI" -Fixture { } } - # Doesn't work in azDO hosts - It "MU should be enabled" -Pending { - if($muEnabled) { - Set-ItResult -Skipped -Because "MU already enabled" - } - - Invoke-TestAndUploadLogOnFailure -Test { - Test-IsMuEnabled | Should -BeTrue -Because "MU should have been enabled" - } - } - It "MSI should uninstall without error" -Skip:(!(Test-Elevated)) { { Invoke-MsiExec -Uninstall -MsiPath $msiX64Path From f7d9d93a8a87c5389540edfd143a1f30cfed87c9 Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Tue, 13 Jul 2021 19:33:36 +0000 Subject: [PATCH 30/48] Fix issues found in manual testing --- assets/wix/Product.wxs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/wix/Product.wxs b/assets/wix/Product.wxs index cab225dbfaf..196efb63559 100644 --- a/assets/wix/Product.wxs +++ b/assets/wix/Product.wxs @@ -433,7 +433,7 @@ 1 1 1 - + ENABLE_MU<>"1" AND USE_MU="1"> 1 1 @@ -445,7 +445,7 @@ 1 1 - NOT Installed + NOT Installed Installed AND NOT PATCH Installed AND PATCH From 0b95775d340837744c16e3fb6c9050f9a950e496 Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Tue, 13 Jul 2021 20:01:43 +0000 Subject: [PATCH 31/48] fix xml syntax --- assets/wix/Product.wxs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/wix/Product.wxs b/assets/wix/Product.wxs index 196efb63559..e0d6bd7a951 100644 --- a/assets/wix/Product.wxs +++ b/assets/wix/Product.wxs @@ -433,7 +433,7 @@ 1 1 1 - ENABLE_MU<>"1" AND USE_MU="1"> + ENABLE_MU="0" AND USE_MU="1"> 1 1 From 27def49844a66143a8b6b571be143a4f6ccac1dc Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Tue, 13 Jul 2021 20:17:48 +0000 Subject: [PATCH 32/48] suppress ice40 --- tools/packaging/packaging.psm1 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/packaging/packaging.psm1 b/tools/packaging/packaging.psm1 index 861dfc95c24..c8a71baa43f 100644 --- a/tools/packaging/packaging.psm1 +++ b/tools/packaging/packaging.psm1 @@ -3278,7 +3278,8 @@ function Start-MsiBuild { Write-Log "running light..." # suppress ICE61, because we allow same version upgrades # suppress ICE57, this suppresses an error caused by our shortcut not being installed per user - Start-NativeExecution -VerboseOutputOnError {& $wixPaths.wixLightExePath -sice:ICE61 -sice:ICE57 -out $msiLocationPath -pdbout $msiPdbLocationPath $objectPaths $extensionArgs } + # suppress ICE40, REINSTALLMODE is defined in the Property table. + Start-NativeExecution -VerboseOutputOnError {& $wixPaths.wixLightExePath -sice:ICE61 -sice:ICE40 -sice:ICE57 -out $msiLocationPath -pdbout $msiPdbLocationPath $objectPaths $extensionArgs } foreach($file in $objectPaths) { From ecc568a16c36cdd422dd0256c04c52b022f1a5a7 Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Tue, 13 Jul 2021 20:18:09 +0000 Subject: [PATCH 33/48] try to fix condition --- assets/wix/Product.wxs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/wix/Product.wxs b/assets/wix/Product.wxs index e0d6bd7a951..9e95791dc16 100644 --- a/assets/wix/Product.wxs +++ b/assets/wix/Product.wxs @@ -433,7 +433,7 @@ 1 1 1 - ENABLE_MU="0" AND USE_MU="1"> + ENABLE_MU=0 AND USE_MU=1> 1 1 From a1fd7f46bab2e2b4b3940a3a92f3ed1fcdb735a7 Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Tue, 13 Jul 2021 20:37:24 +0000 Subject: [PATCH 34/48] Try moving properties to product --- assets/wix/Product.wxs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/wix/Product.wxs b/assets/wix/Product.wxs index 9e95791dc16..46223bec5c9 100644 --- a/assets/wix/Product.wxs +++ b/assets/wix/Product.wxs @@ -52,6 +52,8 @@ + + @@ -341,8 +343,6 @@ - - From b09d26e84ccdde961abc92390799114388672514 Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Tue, 13 Jul 2021 20:57:33 +0000 Subject: [PATCH 35/48] add property ref --- assets/wix/Product.wxs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/assets/wix/Product.wxs b/assets/wix/Product.wxs index 46223bec5c9..72cbb4768e0 100644 --- a/assets/wix/Product.wxs +++ b/assets/wix/Product.wxs @@ -410,6 +410,8 @@ + + From 51b80e84abaf9ef977701c1c8d0f3d85ee207f15 Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Tue, 13 Jul 2021 20:57:41 +0000 Subject: [PATCH 36/48] Revert "Try moving properties to product" This reverts commit a1fd7f46bab2e2b4b3940a3a92f3ed1fcdb735a7. --- assets/wix/Product.wxs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/wix/Product.wxs b/assets/wix/Product.wxs index 72cbb4768e0..de45a3298e0 100644 --- a/assets/wix/Product.wxs +++ b/assets/wix/Product.wxs @@ -52,8 +52,6 @@ - - @@ -343,6 +341,8 @@ + + From 509f592580a2b52987712de22804fbd8581c022a Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Tue, 13 Jul 2021 21:11:15 +0000 Subject: [PATCH 37/48] try random stuff --- assets/wix/Product.wxs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/assets/wix/Product.wxs b/assets/wix/Product.wxs index de45a3298e0..a242393565e 100644 --- a/assets/wix/Product.wxs +++ b/assets/wix/Product.wxs @@ -410,8 +410,8 @@ - - + + @@ -435,7 +435,7 @@ 1 1 1 - ENABLE_MU=0 AND USE_MU=1> + WixUI_ENABLE_MU=0 AND WixUI_USE_MU=1> 1 1 From bae1cfcb45678f138078f974cfd03e4e5da8d70a Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Tue, 13 Jul 2021 21:59:32 +0000 Subject: [PATCH 38/48] Revert "try random stuff" This reverts commit 509f592580a2b52987712de22804fbd8581c022a. --- assets/wix/Product.wxs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/assets/wix/Product.wxs b/assets/wix/Product.wxs index a242393565e..de45a3298e0 100644 --- a/assets/wix/Product.wxs +++ b/assets/wix/Product.wxs @@ -410,8 +410,8 @@ - - + + @@ -435,7 +435,7 @@ 1 1 1 - WixUI_ENABLE_MU=0 AND WixUI_USE_MU=1> + ENABLE_MU=0 AND USE_MU=1> 1 1 From 392a0f8d1e88b3aab7a4b41358cd6884ad60fa5c Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Tue, 13 Jul 2021 21:59:55 +0000 Subject: [PATCH 39/48] remove > --- assets/wix/Product.wxs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/wix/Product.wxs b/assets/wix/Product.wxs index de45a3298e0..46b9f749849 100644 --- a/assets/wix/Product.wxs +++ b/assets/wix/Product.wxs @@ -435,7 +435,7 @@ 1 1 1 - ENABLE_MU=0 AND USE_MU=1> + ENABLE_MU=0 AND USE_MU=1 1 1 From cf1f4e9a840f55462e0bbd9a32315a65e07150a8 Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Tue, 13 Jul 2021 23:27:44 +0000 Subject: [PATCH 40/48] try heath's suggestion --- assets/wix/Product.wxs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/wix/Product.wxs b/assets/wix/Product.wxs index 46b9f749849..326132e1d2a 100644 --- a/assets/wix/Product.wxs +++ b/assets/wix/Product.wxs @@ -435,7 +435,7 @@ 1 1 1 - ENABLE_MU=0 AND USE_MU=1 + NOT ENABLE_MU AND USE_MU=1 1 1 From 167bbef43cf62fa6fb039a83617e22b26de01f0e Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Wed, 14 Jul 2021 17:45:14 +0000 Subject: [PATCH 41/48] Add textbox with warning --- assets/wix/Product.wxs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/assets/wix/Product.wxs b/assets/wix/Product.wxs index 326132e1d2a..eb66a20cb42 100644 --- a/assets/wix/Product.wxs +++ b/assets/wix/Product.wxs @@ -352,6 +352,10 @@ + + + + See the Microsoft Update FAQ.]]> From a1656607c5767a61b213532e81bf035018a0dd7d Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Wed, 14 Jul 2021 18:21:52 +0000 Subject: [PATCH 42/48] try to fix textbox logic --- assets/wix/Product.wxs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/wix/Product.wxs b/assets/wix/Product.wxs index eb66a20cb42..3510a96512d 100644 --- a/assets/wix/Product.wxs +++ b/assets/wix/Product.wxs @@ -353,8 +353,8 @@ - - + "1"]]> + "1" AND USE_MU="1"]]> See the Microsoft Update FAQ.]]> From 9248c9fc5698631d9573b2250da10484276cd331 Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Wed, 14 Jul 2021 19:15:58 +0000 Subject: [PATCH 43/48] Add dialog as checkbox event --- assets/wix/Product.wxs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/assets/wix/Product.wxs b/assets/wix/Product.wxs index 3510a96512d..ab3dba4ca66 100644 --- a/assets/wix/Product.wxs +++ b/assets/wix/Product.wxs @@ -351,7 +351,9 @@ - + + "1" AND USE_MU="1"]]> + "1"]]> "1" AND USE_MU="1"]]> From 689a51fd6969c704fbfa0dfa285a981e370bf094 Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Wed, 14 Jul 2021 19:16:20 +0000 Subject: [PATCH 44/48] try different logic for textbox --- assets/wix/Product.wxs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/wix/Product.wxs b/assets/wix/Product.wxs index ab3dba4ca66..715d9845f5c 100644 --- a/assets/wix/Product.wxs +++ b/assets/wix/Product.wxs @@ -355,8 +355,8 @@ "1" AND USE_MU="1"]]> - "1"]]> - "1" AND USE_MU="1"]]> + + See the Microsoft Update FAQ.]]> From 047e4b9d5d9a363c27cb0f7ae324968f2eeb80a8 Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Wed, 14 Jul 2021 19:48:06 +0000 Subject: [PATCH 45/48] Add simple logic edit box --- assets/wix/Product.wxs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/assets/wix/Product.wxs b/assets/wix/Product.wxs index 715d9845f5c..888e1556abd 100644 --- a/assets/wix/Product.wxs +++ b/assets/wix/Product.wxs @@ -350,17 +350,21 @@ - - + + "1" AND USE_MU="1"]]> - - See the Microsoft Update FAQ.]]> + + + "1"]]> + Read the Microsoft Update Priacy Statement.]]> From f5309a81eb0eff7c26838ccd905da895d5338cc0 Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Wed, 14 Jul 2021 19:50:58 +0000 Subject: [PATCH 46/48] remove all dynamic warning and make static --- assets/wix/Product.wxs | 33 ++++----------------------------- 1 file changed, 4 insertions(+), 29 deletions(-) diff --git a/assets/wix/Product.wxs b/assets/wix/Product.wxs index 888e1556abd..e30bdf6b2ef 100644 --- a/assets/wix/Product.wxs +++ b/assets/wix/Product.wxs @@ -351,20 +351,11 @@ - - "1" AND USE_MU="1"]]> - - - - - - - - "1"]]> - - + Read the Microsoft Update Priacy Statement.]]> @@ -377,20 +368,6 @@ - - - - - Without Microsoft Update enabled, you will need to use another update solution like WSUS or SCCM in order to receive automatic updates. Are you sure you want to continue? - - - 1 - - - 0 - - - @@ -401,7 +378,6 @@ - WixUI_InstallDirDlg - ExplorerContextMenuDialog - MuDialog - - MuWarningDlg - WixUI_VerifyReadyDlg - WixUI_DiskCostDlg Maintenance dialog sequence: @@ -445,7 +421,6 @@ 1 1 1 - NOT ENABLE_MU AND USE_MU=1 1 1 From 3c8da99418fea164777bf3e86cb6aa778ece9b59 Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Wed, 14 Jul 2021 20:17:05 +0000 Subject: [PATCH 47/48] remove periods from end of hyperlinks --- assets/wix/Product.wxs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/wix/Product.wxs b/assets/wix/Product.wxs index e30bdf6b2ef..ffa0b6bea14 100644 --- a/assets/wix/Product.wxs +++ b/assets/wix/Product.wxs @@ -354,10 +354,10 @@ - See the Microsoft Update FAQ.]]> + See the Microsoft Update FAQ]]> - Read the Microsoft Update Priacy Statement.]]> + Read the Microsoft Update Priacy Statement]]> From 4954d34c6d31f1f7f83789fc93f2d6592b0f8d48 Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Wed, 14 Jul 2021 20:19:34 +0000 Subject: [PATCH 48/48] remove dead code --- assets/wix/Product.wxs | 2 -- 1 file changed, 2 deletions(-) diff --git a/assets/wix/Product.wxs b/assets/wix/Product.wxs index ffa0b6bea14..01b5dadee87 100644 --- a/assets/wix/Product.wxs +++ b/assets/wix/Product.wxs @@ -396,8 +396,6 @@ - -