Hi,
Please note that the
Detecting Patches in .NET 2.0 and Visual Studio 2005 article explains how to detect .NET Framework 2.0 SP1.
I find that neither "Less Than" or "Greater Than" for <Content><Comparison> give expected results
Note that these comparison options work only for integer values (a DWORD or String registry value which can be resolved to an integer value). Since a version cannot be resolved to an integer, the search is always false. An alternative is to use a "Registry Value" detection criteria and set the "Min" version to "2.1".
A workaround is to use "Starts With" for <Content><Comparison> but this isn't optimal as Service Pack 2 (if it ever comes out) would break the condition.
The detection method explained in the above article uses another registry value. This value holds the number of the service pack and it can be used to identify which service pack is installed.
the attached screenshot shows what the installer thinks the situation is on the target machine ("Required: any. Found: nothing"), whereas the true state is that I have required a specific version (which is not "Required: any") and it should have found the registry-value ("HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP\v2.0.50727\Version") but it does not satisfy the condition (which is not "Found: nothing").
Please note that the prerequisite information shown to the user can be specified in the
Properties tab of the "Edit Prerequisite" dialog. Therefore, if the "Name", "Ver Min" and "Ver Max" fields are empty, the prerequisite wizard will show "Required: any".
Also, the wizard states "Found: nothing" because the registry value you are using as a detection criteria cannot be resolved to an integer value. If you use a "Registry value" detection criteria instead of "Registry value with specified content", the wizard will show the .NET Framework version found on the machine (if the "Version" value exists).
Regards,
Cosmin
FOLLOW US
Get the latest news in Application Packaging