Skip to content

Commit

Permalink
(GH-897) Fix DISM /all for newer Windows versions
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jrkd authored and ferventcoder committed Aug 10, 2016
1 parent 31bd53c commit a5918ef
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ public string build_args(ChocolateyConfiguration config, IDictionary<string, Ext
var args = ExternalCommandArgsBuilder.build_arguments(config, argsDictionary);

// at least Windows 8/2012
if (config.Information.PlatformVersion.Major >= 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");
}
Expand Down Expand Up @@ -401,4 +401,4 @@ public ConcurrentDictionary<string, PackageResult> uninstall_run(ChocolateyConfi
return packageResults;
}
}
}
}

0 comments on commit a5918ef

Please sign in to comment.