Package resource on Windows intermittently runs again during Chef runs

We use Web Services Enhancements (WSE) 2.0 sp3 in our environment. Utilizing the ‘package’ resource I am installing this utility via the MSI file I copy to the system during initial build/configuration. The application installs fine, and if I re-run the chef-client on a system that has this, it typically doesn’t apply again. However I am finding that if I wait an undetermined period of time that resource seems to think it has to run again. For example I have setup my Chef client to run once nightly. All 4 systems I tested this on last night re-applied that resource.
My question isn’t so much geared at using WSE but in terms of are there any other Windows users that seem to have any similar behaviors when using the package resource on Windows?
I have several other uses of the package resource on Windows and they don’t behave like this but I am not real anxious to rewrite this one resource for better installation checking before it runs.
Thoughts?

Packaging on windows can sometimes be wierd.
If the package isn’t properly idempotent, you can use an only_if or not_if guard to check the registry to verify the package is installed.

package 'vc_redist' do
  guard_interpreter :powershell_script
  source 'https://foo.example.com/vc_redist-update3.x64.exe'
  installer_type :custom
  version '14.0.24215.1'
  checksum 'da66717784c192f1004e856bbcf7b3e13b7bf3ea45932c48e4c9b9a50ca80965'
  options '/install /quiet'
  action :install
  # This checks if 'any' program is installed that has version 14.0.24215, this could be improved to check for specific program name. 
  not_if "get-itemproperty 'HKLM:\\Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\*' | % { if ($_.DisplayVersion -eq '14.0.24215' ){ exit 0} }; exit 1"
end

Regarding, WSE in particular, I would recommend

  1. Make sure you install with the /quiet switch to prevent a gui from poping up
  2. Explicitly set installer_type to :msi. Chef will try and auto detect the installer type. Its pretty good, but not perfect.
  3. Mirror the MSI somewhere in your infrastructure. From time to time microsoft changes the URL of downloads. Artifactory or Nexus are 2 good artifact repositories.
package 'WCE' do
  name 'Microsoft WSE 3.0'
  source 'http://download.microsoft.com/download/5/5/1/5511bfc6-e52f-4db0-bafb-fd5dcb91eff0/Microsoft%20WSE%203.0.msi' #TODO: mirror in artifactory
  installer_type :msi
  options '/quiet'
  action :install
end