Here is what I use:

<util:RegistrySearch Root="HKLM" Key="SOFTWARE\Microsoft\Net Framework 
Setup\NDP\v4\Full" Value="Version" Variable="Netfx4FullVersion" />
    <util:RegistrySearch Root="HKLM" Key="SOFTWARE\Microsoft\Net Framework 
Setup\NDP\v4\Full" Value="Version" Variable="Netfx4x64FullVersion" Win64="yes" 
/>

<PackageGroup Id="Netfx45">
    <ExePackage Id="Netfx45" Cache="no" Compressed="yes" PerMachine="yes" 
Protocol="netfx4" Permanent="yes" Vital="yes" InstallCommand="/norestart 
/passive /showrmui"
                SourceFile="dotNetFx45_Full_setup.exe"
                DetectCondition="(Netfx4FullVersion=&quot;4.5.50709&quot;) AND 
(NOT VersionNT64 OR (Netfx4x64FullVersion=&quot;4.5.50709&quot;))"
                InstallCondition="(VersionNT >= v6.0 OR VersionNT64 >= v6.0) 
AND (NOT (Netfx4FullVersion=&quot;4.5.50709&quot; OR 
Netfx4x64FullVersion=&quot;4.5.50709&quot;))"/>

<Chain>
      <PackageGroupRef Id="Netfx45"/>
      ...
</Chain>

Note the /passive /showrmui in the installcommand:  This will prompt the user 
to close .Net applications to avoid a reboot.

Hope this helps,

Nick

-----Original Message-----
From: Marco Tognacci [mailto:mark...@live.it] 
Sent: Thursday, May 16, 2013 3:59 PM
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] Install Net Framework 4.5 as prerequisite only if on 
windows 7-8 and not installed

I have a Burn setup with managed UI in WPF so I need to install The net 
framework 4 as prerequisite for the installer and my application, but as in the 
Net Framework 4.5 there are some usefull fix, I want to install the net 
framework 4.5 if possible.I'd like to make this:
1 - On WIndows XP - I want to Install Net Framework 4.0 as prerequisite for 
Burn setup.2 - On Windows 7-8 and no Net Framework 4.0 installed - I want to 
install Net Framework 4.5 as prerequisite for the Burn setup.3 - On Windows 7-8 
and with Net Framework 4.0 installed - I want to install Net Framework 4.5 with 
the burn UI, (not as a prerequisite) Now I was able only to set Net Framework 
as prerequisite for the Burn setup, and only with Windows 7-8 I install even 
the Net Framework 4.5 during Burn setup.This way works, but if I want to 
install on a Windows 7-8 system with no Net Framework 4.0 installed I have to 
Install Net Framework 4.0 as prerequisite for the setup then I have to install 
the Net Framework 4.5 inside the Burn setup chain. I'd like to skip the 
installing of the Net Framework 4.0 and install only the Net Framework 4.5 Is 
there any way for doing this?
                                          
------------------------------------------------------------------------------
AlienVault Unified Security Management (USM) platform delivers complete 
security visibility with the essential security capabilities. Easily and 
efficiently configure, manage, and operate all of your security controls from a 
single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users



------------------------------------------------------------------------------
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to