Skip to content

Commit

Permalink
Add support for .Net 4.6.2. Replace KB2919442 with KB3021910.
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Matatko <matatko.marting@gmail.com>
  • Loading branch information
Martin Matatko committed Oct 27, 2016
1 parent 9221422 commit 6f2ec50
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 14 deletions.
39 changes: 31 additions & 8 deletions libraries/package_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,11 @@ def packages
url: 'https://download.microsoft.com/download/E/4/1/E4173890-A24A-4936-9FC9-AF930FE3FA40/NDP461-KB3102436-x86-x64-AllOS-ENU.exe',
checksum: 'beaa901e07347d056efe04e8961d5546c7518fab9246892178505a7ba631c301',
},
'4.6.2' => {
name: 'Microsoft .NET Framework 4.6.2',
url: 'https://download.microsoft.com/download/F/9/4/F942F07D-F26F-4F30-B4E3-EBD54FABA377/NDP462-KB3151800-x86-x64-AllOS-ENU.exe',
checksum: '28886593e3b32f018241a4c0b745e564526dbb3295cb2635944e3a393f4278d4',
},
###########
# Patches
###########
Expand All @@ -105,15 +110,15 @@ def packages
checksum: x64? ? 'bf850afc7e7987d513fd2c19c9398d014bcbaaeb1691357fa0400529975edace' : '41e675937d023828d648c7a245e19695ed12f890c349d8b6f2b620e6e58e038e',
not_if: 'reg query "HKLM\SOFTWARE\Microsoft\Updates\Microsoft .NET Framework 4.6\KB3083186" | FindStr /Ec:"ThisVersionInstalled +REG_SZ +Y"',
},
'KB2919442' => {
name: 'Update for Microsoft Windows (KB2919442)',
'KB3021910' => {
name: 'Update for Microsoft Windows (KB3021910)',
url: if x64?
'https://download.microsoft.com/download/D/6/0/D60ED3E0-93A5-4505-8F6A-8D0A5DA16C8A/Windows8.1-KB2919442-x64.msu'
'https://download.microsoft.com/download/6/1/5/615B8D87-A02C-485E-B9B5-D6F4AEB52D78/Windows8.1-KB3021910-x64.msu'
else
'https://download.microsoft.com/download/9/D/A/9DA6C939-9E65-4681-BBBE-A8F73A5C116F/Windows8.1-KB2919442-x86.msu'
'https://download.microsoft.com/download/2/B/8/2B832205-A313-45A4-9356-DF5E47B70663/Windows8.1-KB3021910-x86.msu'
end,
options: '/norestart /quiet',
checksum: x64? ? 'c10787e669b484674584a990e069295e8b81b5366f98508010a3ae181b729482' : '3368c3a329f402fd982b15b399368627b96973f008a5456b5286bdfc10c1169b',
checksum: x64? ? 'FEB03C1C3D5719EC2E7873C0B9B85BB9E9DB44DF88C75F9DDD5222942E4BF928' : '971D1B18CB26E578926591EE944F7183BE7A6D7ABFC2E255B930803666EEBC20',
},
'KB2919355' => {
name: 'Update for Microsoft Windows (KB2919355)',
Expand All @@ -128,12 +133,30 @@ def packages
).tap do |packages|
# Some packages are installed as QFE updates on 2012, 2012R2 & 10
case nt_version
# Windows 8 & Server 2012
when 6.2
{ '4.5.2' => 'KB2901982', '4.6' => 'KB3045562', '4.6.1' => 'KB3102439' }
{
'4.5.2' => 'KB2901982',
'4.6' => 'KB3045562',
'4.6.1' => 'KB3102439',
'4.6.2' => 'KB3151804',
}
# Windows 8.1 & Server 2012R2
when 6.3
{ '4.5.2' => 'KB2934520', '4.6' => 'KB3045563', '4.6.1' => 'KB3102467', 'KB2919442' => 'KB2919442', 'KB2919355' => 'KB2919355' }
{
'4.5.2' => 'KB2934520',
'4.6' => 'KB3045563',
'4.6.1' => 'KB3102467',
'4.6.2' => 'KB3151864',
'KB3021910' => 'KB3021910',
'KB2919355' => 'KB2919355',
}
# Windows 10
when 10
{ '4.6.1' => 'KB3102495' }
{
'4.6.1' => 'KB3102495',
'4.6.2' => 'KB3151900',
}
else
{}
end.each { |v, kb| packages[v][:not_if] = "C:\\Windows\\System32\\wbem\\wmic.exe QFE where HotFixID='#{kb}' | FindStr #{kb}" }
Expand Down
17 changes: 11 additions & 6 deletions libraries/v4_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,12 @@ def installed_version
when 379_893 then '4.5.2'
when 393_295, 393_297 then '4.6'
when 394_254, 394_271 then '4.6.1'
when 394_802, 394_806 then '4.6.2'
end if values[:Install].to_i == 1
end

def supported_versions
@supported_versions ||= %w(4.0 4.5 4.5.1 4.5.2 4.6 4.6.1)
@supported_versions ||= %w(4.0 4.5 4.5.1 4.5.2 4.6 4.6.1 4.6.2)
end

protected
Expand Down Expand Up @@ -87,13 +88,13 @@ def package_setup
# Windows Vista & Server 2008
when 6.0 then %w(4.0 4.5 4.5.1 4.5.2 4.6)
# Windows 7 & Server 2008R2
when 6.1 then %w(4.0 4.5 4.5.1 4.5.2 4.6 4.6.1)
when 6.1 then %w(4.0 4.5 4.5.1 4.5.2 4.6 4.6.1 4.6.2)
# Windows 8 & Server 2012
when 6.2 then %w(4.5.1 4.5.2 4.6 4.6.1)
# Windows 8.1 & Server 2012R2
when 6.3 then %w(4.5.2 4.6 4.6.1)
when 6.3 then %w(4.5.2 4.6 4.6.1 4.6.2)
# Windows 10
when 10 then %w(4.6.1)
when 10 then %w(4.6.1 4.6.2)
# Other versions
else []
end
Expand All @@ -102,8 +103,12 @@ def package_setup
def prerequisite_names
@patch_names ||= case nt_version
when 6.3
prerequisites_46 = %w(KB2919442 KB2919355)
{ '4.6' => prerequisites_46, '4.6.1' => prerequisites_46 }
prerequisites_46 = %w(KB3021910 KB2919355)
{
'4.6' => prerequisites_46,
'4.6.1' => prerequisites_46,
'4.6.2' => prerequisites_46,
}
else
{}
end
Expand Down

0 comments on commit 6f2ec50

Please sign in to comment.