title: How do I install .NET Framework only when it's not already installed?
body: <p>Is there a way to check if the .NET Framework 4 has been installed and install it only when it's not in the system?</p>
  
  <p>I know, how do I determine, if the .NET Framework 4 is installed by checking the following registry key?</p>
  
  <pre class="lang-pascal prettyprint-override"><code>hasDotnet4 :=
    RegKeyExists(HKEY_LOCAL_MACHINE, 'SOFTWARE\Microsoft\.NETFramework\policy\v4.0');
  </code></pre>
  
  <p>How do I conditionally run the .NET Framework 4 installation based on the above check?</p>