Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if platform?("windows") && win_version.windows_server_2008_r2?
- windows_package "Internet Explorer 9" do
- source node[:internet_explorer]["IE9_URL"]
- installer_type :custom
- options '/passive /norestart'
- success_codes [0, 3010]
- action :install
- guard_interpreter :powershell_script
- only_if <<-EOH
- [System.Reflection.Assembly]::LoadWithPartialName("System.Version")
- $condition = New-Object System.Version("9.0.0.0")
- $currentVersion = New-Object System.Version((Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Internet Explorer').Version)
- $currentVersion -lt $condition
- EOH
- end
- else
- raise "The 'install_IE9' recipe is only compatible with Windows Server 2008 R2."
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement