Skip to content

Commit

Permalink
Add .NET 4.6 prerequisites
Browse files Browse the repository at this point in the history
On Windows Server 2012R2 and Windows 8.1, .NET 4.6 requires KB2919355
  • Loading branch information
Annih committed Jul 14, 2016
1 parent 948d2a0 commit 2567b87
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 4 deletions.
16 changes: 14 additions & 2 deletions libraries/package_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,25 @@ 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"',
},
'KB2919355-x64' => {
name: 'Update for Microsoft Windows (KB2919355)',
url: 'https://download.microsoft.com/download/2/5/6/256CCCFB-5341-4A8D-A277-8A81B21A1E35/Windows8.1-KB2919355-x64.msu',
options: '/norestart /quiet',
checksum: 'b0c9ada530f5ee90bb962afa9ed26218c582362315e13b1ba97e59767cb7825d',
},
'KB2919355-x86' => {
name: 'Update for Microsoft Windows (KB2919355)',
url: 'https://download.microsoft.com/download/4/E/C/4EC66C83-1E15-43FD-B591-63FB7A1A5C04/Windows8.1-KB2919355-x86.msu',
options: '/norestart /quiet',
checksum: 'f8beca5b463a36e1fef45ad0dca6a0de7606930380514ac1852df5ca6e3f6c1d',
},
).tap do |packages|
# .NET 4.5.2, 4.6 & 4.6.1 are sometimes installed as update on 2012, 2012R2 & 10
# Some packages are installed as QFE updates on 2012, 2012R2 & 10
case nt_version
when 6.2
{ '4.5.2' => 'KB2901982', '4.6' => 'KB3045562', '4.6.1' => 'KB3102439' }
when 6.3
{ '4.5.2' => 'KB2934520', '4.6' => 'KB3045563', '4.6.1' => 'KB3102467' }
{ '4.5.2' => 'KB2934520', '4.6' => 'KB3045563', '4.6.1' => 'KB3102467', "KB2919355-#{arch}" => 'KB2919355' }
when 10
{ '4.6.1' => 'KB3102495' }
else
Expand Down
8 changes: 7 additions & 1 deletion libraries/v4_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,13 @@ def package_setup
end

def prerequisite_names
@patch_names ||= {}
@patch_names ||= case nt_version
when 6.3
prerequisites_46 = ["KB2919355-#{arch}"]
{ '4.6' => prerequisites_46, '4.6.1' => prerequisites_46 }
else
{}
end
end
end
end
2 changes: 1 addition & 1 deletion providers/framework.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def load_current_resource
action :install
installer_type :custom
success_codes [0, 3010]
options '/q /norestart'
options pkg[:options] || '/q /norestart'
timeout new_resource.timeout
# Package specific info
checksum pkg[:checksum]
Expand Down

0 comments on commit 2567b87

Please sign in to comment.