Mohan Chandra

Mohan Chandra

  • NA
  • 101
  • 15.8k

how I can give RegistrySearch in creating setup via Wix

Oct 5 2016 6:32 AM
hi, Please help me,
how I can give RegistrySearch for .net framework 4.6  in creating setup via Wix in C#,
 
and if its not found then download it from our website with silently Install
 
I have write some code like this
 
<WixVariable Id="WixMbaPrereqPackageId" Value="Netfx4Full" />
<Chain DisableRollback="yes" DisableSystemRestore="yes">
 
<PackageGroupRef Id="DotNetFramework4"/> 
 
<Fragment>
<util:RegistrySearch Root="HKLM" Key="SOFTWARE\Microsoft\Net Framework Setup\NDP\v4.6\Full" Value="Version" Variable="Netfx4FullVersion" />
<util:RegistrySearch Root="HKLM" Key="SOFTWARE\Microsoft\Net Framework Setup\NDP\v4.6\Full" Value="Version" Variable="Netfx4x64FullVersion" Win64="yes" />
<PackageGroup Id="DotNetFramework4">
<ExePackage Id="netfx_Full64"
DisplayName="Microsoft .NET Framework 4.6"
Cache="yes"
Compressed="no"
PerMachine="yes"
Permanent="yes"
Vital="yes"
SuppressSignatureVerification="no"
Name="Prerequisites\NDP46-KB3045560-Web.exe"
Description="Installing [Prerequisites] Microsoft .Net Framework silently"
InstallCommand="/q /norestart"
SourceFile=".\Prerequisites\NDP46-KB3045560-Web.exe"
InstallCondition="NOT VersionNT64"
DetectCondition="Netfx4FullVersion"
DownloadUrl="$(var.DownloadURL)NDP46-KB3045560-Web.exe"
/>
<ExePackage Id="netfx_Full32"
DisplayName="Microsoft .NET Framework 4.6"
Cache="yes"
Compressed="no"
PerMachine="yes"
Permanent="yes"
Vital="yes"
SuppressSignatureVerification="no"
Name="Prerequisites\NDP46-KB3045560-Web.exe"
Description="Installing [Prerequisites] Microsoft .Net Framework silently"
InstallCommand="/q /norestart"
SourceFile=".\Prerequisites\NDP46-KB3045560-Web.exe"
InstallCondition="VersionNT64"
DetectCondition="Netfx4FullVersion AND (NOT VersionNT64 OR Netfx4x64FullVersion)"
DownloadUrl="$(var.DownloadURL)NDP46-KB3045560-Web.exe"
/>
<!--WINDOW SSERVICE-->
<!--<MsiPackage DisplayName="CashPunditServiceX32"
SourceFile=".\Prerequisites\CashPunditService.msi"
Name="Prerequisites\CashPunditService.msi"
Visible="no"
ForcePerMachine="yes"
SuppressSignatureVerification="no"
Compressed="no"
Vital="no"
DownloadUrl="$(var.DownloadURL)CashPunditService.msi"
InstallCondition="VersionNT=v5.1 AND NOT VersionNT64"
>
</MsiPackage>
<MsiPackage DisplayName="CashPunditServiceX64"
SourceFile="Prerequisites\CashPunditService.msi"
Visible="no"
ForcePerMachine="yes"
SuppressSignatureVerification="no"
Compressed="no"
Vital="yes"
DownloadUrl="$(var.DownloadURL)CashPunditService.msi"
InstallCondition="VersionNT=v5.2 AND VersionNT64"
>
</MsiPackage>-->
</PackageGroup>
<!--
<PackageGroup Id="DotNetFramework4_XFull">
<ExePackage Id="Netfx4Full"
DisplayName="Microsoft .NET Framework 4.0"
Cache="yes"
Compressed="no"
PerMachine="yes"
Permanent="yes"
Vital="no"
SuppressSignatureVerification="no"
Name="Prerequisites\dotNetFx40_Full_x86_x64.exe"
Description="Installing [Prerequisites] Microsoft .Net Framework silently"
InstallCommand="/q"
SourceFile=".\Prerequisites\dotNetFx40_Full_x86_x64.exe"
InstallCondition="VersionNT64"
DetectCondition="Netfx4x64FullVersion"
DownloadUrl="http://www.cash4caster.com/Downloads/dotNetFx40_Full_x86_x64.exe"
/>
</PackageGroup>
-->
</Fragment>
 
but when I am going to run exe then setup failed....
 
please help me how I can fix this issue.