From a5918ef511572d25fa7797a70ff6a528770982c2 Mon Sep 17 00:00:00 2001 From: Jono Date: Tue, 9 Aug 2016 10:13:06 +0100 Subject: [PATCH] (GH-897) Fix DISM /all for newer Windows versions DISM /all was never running for source windowsfeatures due to only running on Windows 6.2. The issue here was minor version was always required to be > 2, so now that we're at windows 10.0.x /all is not being added, even though this logic really only wanted to make sure the version was >= 6.2 Added a check to see if the version is greater than 6 entirely, if not, only then does it check if its version 6 and at least minor ver. 6.2. Not calling /all as part of DISM meant that dependencies for windows features were never installed as part of the installation. --- .../infrastructure.app/services/WindowsFeatureService.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/chocolatey/infrastructure.app/services/WindowsFeatureService.cs b/src/chocolatey/infrastructure.app/services/WindowsFeatureService.cs index ce5e4187da..c9d9048798 100644 --- a/src/chocolatey/infrastructure.app/services/WindowsFeatureService.cs +++ b/src/chocolatey/infrastructure.app/services/WindowsFeatureService.cs @@ -227,7 +227,7 @@ public string build_args(ChocolateyConfiguration config, IDictionary= 6 && config.Information.PlatformVersion.Minor >= 2) + if (config.Information.PlatformVersion.Major > 6 || (config.Information.PlatformVersion.Major == 6 && config.Information.PlatformVersion.Minor >= 2)) { args = args.Replace(ALL_TOKEN, "/All"); } @@ -401,4 +401,4 @@ public ConcurrentDictionary uninstall_run(ChocolateyConfi return packageResults; } } -} \ No newline at end of file +}