title: Need to copy a file via puppet only if a Windows MSI package is not installed
body: <p>I'm new using puppet on Windows.
  I'm trying to install a MSI package from a shared folder on our network, but do to permissions, the shared folder is "read" only, it does not have "execute" permissions so when the puppet agent runs and tries to install the MS, it fails.</p>
  
  <p>What I want to do is to copy the MSI installer to a local directory ONLY if the package needs to be installed.</p>
  
  <p>This is how I'm installing the package and copying to a local dir:</p>
  
  <pre><code>class app_install {
      package { '7-Zip 9.38 (x64 edition)':
          provider =&gt; windows,
          ensure   =&gt; installed,
          source =&gt; 'c:\\temp\7zip_testInstall.msi',
          install_options =&gt; ['INSTALLDIR=C:\apps64\7-Zip'],
      }
      file { 'c:/temp/7zip_testInstall.msi':
          ensure =&gt; 'file',
          mode   =&gt; '0660',
          group  =&gt; 'Domain Users',
          source =&gt; 'c:\\temp\7zip_testInstall.msi',
       }
  </code></pre>
  
  <h2>}</h2>
  
  <p>When I run puppet and it finds that the package is not installed, it copies the file to a c:\temp, then proceeds to install the package. This is the expected behavior.
  On subsequent runs of the puppet agent, it finds that the package is already installed, so it skips the installation, but then proceeds to copy the installer to c:\temp again if the installer is missing from c:\temp - given the fact that this is a temp folder, it gets purged every so often.</p>
  
  <p>What I'm trying to avoid is to copy the installer if the package is already installed.</p>
  
  <p>I'm not sure how to go about it.</p>
  
  <p>Please advise and thanks!</p>
  
  <p>Fr3edom21.</p>