title: .NET Framework 4 installFailed
body: <p>My addin target 64 bit Excel requires .NET 4 client profile. When I build installer (VS Setup project), I put .NET 4 client profile in prerequisite.<br>
  When I install my AddIn on a PC without .NET framework 4 client profile, my installer tries to download &amp; install it.  </p>
  
  <p>However, the installation failed.  I have admin right so no permission issue.  IT guys told me there is some certificate issue with .NET 4 web installer and I have to use Full installer. </p>
  
  <p>Then I replaced .NET 4 client profile with .NET 4 in prerequisite.  But it did not work either. Installer gave the almost the same error.</p>
  
  <p>But if I download .NET 4 installation and install it manually before install my addin, it installs without problem. </p>
  
  <p>Here is error message: (with .NET 4 client profile in prerequisite)
  ....</p>
  
  <blockquote>
    <p>Running checks for package 'Microsoft .NET Framework 4 Client Profile
    (x86 and x64)', phase BeforePackage Reading value 'Version' of
    registry key 'HKLM\Software\Microsoft\NET Framework
    Setup\NDP\v4\Client' Unable to read registry value Not setting value
    for property 'DotNet40Client_TargetVersion' The following properties
    have been set for package 'Microsoft .NET Framework 4 Client Profile
    (x86 and x64)': Running checks for command
    'DotNetFX40Client\dotNetFx40_Client_setup.exe' Result of running
    operator 'ValueNotEqualTo' on property 'InstallMode' and value
    'HomeSite': false Skipping ByPassIf because Property
    'DotNet40Client_TargetVersion' was not defined Result of running
    operator 'ValueEqualTo' on property 'AdminUser' and value 'false':
    false Result of running operator 'VersionLessThan' on property
    'VersionNT' and value '5.1.2': false Result of running operator
    'ValueEqualTo' on property 'ProcessorArchitecture' and value 'IA64':
    false Result of checks for command
    'DotNetFX40Client\dotNetFx40_Client_setup.exe' is 'Install' 'Microsoft
    .NET Framework 4 Client Profile (x86 and x64)' RunCheck result:
    Install Needed Verifying file integrity of
    C:\Users\MyName\AppData\Local\Temp\VSD54E2.tmp\DotNetFX40Client\dotNetFx40_Client_setup.exe
    WinVerifyTrust returned 0 File trusted Installing using command
    'C:\Users\MyName\AppData\Local\Temp\VSD54E2.tmp\DotNetFX40Client\dotNetFx40_Client_setup.exe'
    and parameters ' /q /norestart /ChainingPackage ClientX64ClickOnce
    /lcid 1033' Process exited with code -2146762482 Status of package
    'Microsoft .NET Framework 4 Client Profile (x86 and x64)' after
    install is 'InstallFailed'</p>
  </blockquote>
  
  <p>Edit:
  I change .NET Framework 4 client profile to .NET framework 4,  installer still failed but I got a slightly different error message. </p>
  
  <blockquote>
    <p>Component Microsoft .NET Framework 4 (x86 and x64) has failed to
    install with the following error message: "A failure occurred
    attempting to install the .NET Framework 4 Full."</p>
    
    <p>The following components failed to install:
    - Microsoft .NET Framework 4 (x86 and x64)</p>
    
    <p>See the setup log file located at
    'C:\Users***\AppData\Local\Temp\VSD2403.tmp\install.log' for more
    information.</p>
    
    <p>the log file is:  File trusted Running checks for package 'Microsoft
    .NET Framework 4 (x86 and x64)', phase BeforePackage Reading value
    'Version' of registry key 'HKLM\Software\Microsoft\NET Framework
    Setup\NDP\v4\Full' Unable to read registry value Not setting value for
    property 'DotNet40Full_TargetVersion' The following properties have
    been set for package 'Microsoft .NET Framework 4 (x86 and x64)':
    Running checks for command 'DotNetFX40\dotNetFx40_Full_setup.exe'
    Result of running operator 'ValueNotEqualTo' on property 'InstallMode'
    and value 'HomeSite': false Skipping ByPassIf because Property
    'DotNet40Full_TargetVersion' was not defined Result of running
    operator 'ValueEqualTo' on property 'AdminUser' and value 'false':
    false Result of running operator 'VersionLessThan' on property
    'VersionNT' and value '5.1.2': false Result of running operator
    'ValueEqualTo' on property 'ProcessorArchitecture' and value 'IA64':
    false Result of checks for command
    'DotNetFX40\dotNetFx40_Full_setup.exe' is 'Install' 'Microsoft .NET
    Framework 4 (x86 and x64)' RunCheck result: Install Needed Verifying
    file integrity of
    C:\Users\yhou\AppData\Local\Temp\VSD2403.tmp\DotNetFX40\dotNetFx40_Full_setup.exe
    WinVerifyTrust returned 0 File trusted Installing using command
    'C:\Users\yhou\AppData\Local\Temp\VSD2403.tmp\DotNetFX40\dotNetFx40_Full_setup.exe'
    and parameters ' /q /norestart /ChainingPackage FullX64Bootstrapper
    /lcid 1033' Process exited with code -2146762482 Status of package
    'Microsoft .NET Framework 4 (x86 and x64)' after install is
    'InstallFailed'</p>
  </blockquote>