View Full Version : Don't want .NET 1.0 installed if 1.1 has been installed

05-06-2004, 03:47 PM
I have an install script project that uses a .NET 1.0 install object. How can I prevent the install from installing this object if version 1.1 has already been installed? Right now it installs 1.0 along side 1.1


05-10-2004, 02:39 PM
Hi Kathy,

I haven't tried this, but.... Create a new Feature, add the .Net 1.0 object as it's only "fileset"

Verify if .Net is installed or not...
if installed then turn the feature "off"
if not installed the feature will be installed

use this function to select/not select the feature:
FeatureSelectItem ( szFeatureSource, szFeature, bSelect );

hope that helps,

Paul D
05-11-2004, 12:25 PM
How exactly do you verify if .net is installed or not? I've read documents that say check for the exsistance of "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\policy\v1.0" or "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\policy\v1.1", but this only works for a sespefic version. Like Kathy's problem, when a 1.2 or 2.0 comes out and uses a diff reg key, installers checking for .NET using the 1.1 reg key will think .NET is not install and end up installing .NET 1.1 with a .NET 2.0.

Is there any better method checking for .NET where you can do a version compare?