Skip to content

Instantly share code, notes, and snippets.

@paulmooring
Created February 14, 2013 19:10
Show Gist options
  • Save paulmooring/4955410 to your computer and use it in GitHub Desktop.
Save paulmooring/4955410 to your computer and use it in GitHub Desktop.
hacky webpi install-msi.rb recipe
# Author:: Guilhem Lettron (<[email protected]>)
# Cookbook Name:: webpi
# Recipe:: install-msi
#
# Copyright 2011, Opscode, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
include_recipe "windows"
#msi bug workaround
msi_file = ::File.join( Chef::Config[:file_cache_path], "wpi.msi" )
remote_file "msi" do
path msi_file
source node['webpi']['msi']
action :create
end
windows_package "Web Platform Installer" do
source msi_file
action :install
not_if { ::File.exists? "C:/Program Files/Microsoft/Web Platform Installer" }
end
# MSI manage PATH
node.default['webpi']['bin'] = "WebpiCmd.exe"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment