lib/puppet/provider/package/msi.rb
# (Un)install may "fail" because the package requested a reboot, the system requested a
# reboot, or something else entirely. Reboot requests mean the package was installed
# successfully, but we warn since we don't have a good reboot strategy.
(Un)install may "fail" because the package requested a reboot, the system requested a
reboot, or something else entirely. Reboot requests mean the package was installed
successfully, but we warn since we don't have a good reboot strategy.
( Un ) install may " fail " because the package requested a reboot the system requested a reboot or something else entirely . Reboot requests mean the package was installed successfully but we warn since we don ' t have a good reboot strategy .
def check_result(hr)
    operation = resource[:ensure] == :absent ? 'uninstall' : 'install'
    case hr
    when 0
    when 194
      warning("The package requested a reboot to finish the operation.")
    when 1641
      warning("The package #{operation}ed successfully and the system is rebooting now.")
    when 3010
      warning("The package #{operation}ed successfully, but the system must be rebooted.")
    else
      raise Puppet::Util::Windows::Error.new("Failed to #{operation}", hr)
    end
  end
def check_result ( hr ) operation = resource [ :ensure ] == :absent ? 'uninstall' : 'install' case hr when 0 when 194 warning ( "The package requested a reboot to finish the operation." ) when 1641 warning ( "The package #{operation}ed successfully and the system is rebooting now." ) when 3010 warning ( "The package #{operation}ed successfully, but the system must be rebooted." ) else raise Puppet :: Util :: Windows :: Error . new ( "Failed to #{operation}" , hr ) end end
(Un)install may "fail" because the package requested a reboot, the system requested a
reboot, or something else entirely.
( Un ) install may " fail " because the package requested a reboot the system requested a reboot or something else entirely .
# http://msdn.microsoft.com/en-us/library/windows/desktop/aa368542(v=vs.85).aspx # yeah
hr
<not_specific>