I have the following package as part of my bootstrapper project, with the following InstallCondition on it:
<ExePackage Permanent="yes" Id="NETFXThroughMicrosoftDownloads" Name="dotnetfx35setup.exe" DownloadUrl="http://ift.tt/1iuHJQQ" Compressed="no" InstallCommand="/q /norestart" InstallCondition="(NOT NETFRAMEWORK35_SP_LEVEL OR NETFRAMEWORK35_SP_LEVEL = "#0") AND WINDOWSVERSION <= v6.0">
<RemotePayload CertificatePublicKey="F321408E7C51F8544B98E517D76A8334052E26E8" CertificateThumbprint="D57FAC60F1A8D34877AEB350E83F46F6EFC9E5F1" Description="Microsoft .NET Framework 3.5 Setup" Hash="EC9F0C31B9949CA1CF14E9A43BCA065FA5BC0E71" ProductName="Microsoft .NET Framework 3.5" Size="2959376" Version="3.5.30729.1" />
</ExePackage>
But on Windows XP x86, the condition is not met. Here is the log:
Condition '(NOT NETFRAMEWORK35_SP_LEVEL OR NETFRAMEWORK35_SP_LEVEL = "#0") AND WINDOWSVERSION <= v6.0' evaluates to false.
I'm not sure why this is...I know that, for sure, the NETFRAMEWORK35_SP_LEVEL registry key is not found within my custom search, so this property is never set:
<util:RegistrySearch Id='NETFRAMEWORK35_SP_LEVELSearch' Root="HKLM" Key="SOFTWARE\Microsoft\Microsoft\NET Framework Setup\NDP\v3.5" Value="SP" Variable="NETFRAMEWORK35_SP_LEVEL" />
<util:RegistrySearch Id='NETFRAMEWORK35_SP_LEVELSearchWin64' Root="HKLM" Key="SOFTWARE\Microsoft\Microsoft\NET Framework Setup\NDP\v3.5" Value="SP" Variable="NETFRAMEWORK35_SP_LEVEL" Win64="yes" />
<util:RegistrySearch Id='NETFRAMEWORK35_SP_LEVELSearchWow64' Root="HKLM" Key="SOFTWARE\Wow6432Node\Microsoft\NET Framework Setup\NDP\v3.5" Value="SP" Variable="NETFRAMEWORK35_SP_LEVEL" />
<util:RegistrySearch Id='NETFRAMEWORK35_SP_LEVELSearchWin64Wow64' Root="HKLM" Key="SOFTWARE\Wow6432Node\Microsoft\NET Framework Setup\NDP\v3.5" Value="SP" Variable="NETFRAMEWORK35_SP_LEVEL" Win64="yes" />
Whereas, WINDOWSVERSION gets set correctly:
Setting string variable 'WINDOWSVERSION' to value '5.1'
I would expect NOT NETFRAMEWORK35_SP_LEVEL to evaluate to TRUE, and as a result TRUE AND TRUE should run the condition, or am I mistaken? How do you detect a failed registry search here? What am I doing wrong?
No comments:
Post a Comment