Tuesday, September 05, 2006

Detect older versions when deploying .NET Framework 2.0

Here is an overview of the algorithm that .NET Framework 2.0 and 3.0 setup use to determine whether any previous beta products are on the system:

For each (beta product code)
{

Call MsiQueryProductState to check if the install state for the product code equals INSTALLSTATE_DEFAULT

if (install state == INSTALLSTATE_DEFAULT)
{

Call MsiGetProductInfo to retrieve the INSTALLPROPERTY_INSTALLEDPRODUCTNAME property for the product code
Add the value of the INSTALLPROPERTY_INSTALLEDPRODUCTNAME property to the list of beta products that need to be uninstalled

}

}

If (list of beta products is not empty)
{

If (setup is running in full UI mode)
{

Display UI with a list of product names that need to be uninstalled via Add/Remove Programs

}

Exit setup with return code 4113

}

The difference between the .NET Framework 2.0 and 3.0 is the location of the list of beta product codes.  You can find the beta product codes for the .NET Framework 3.0 by using these steps:

  1. Download the .NET Framework 3.0 web download bootstrapper and save it to your hard drive

  2. Extract the contents by running dotnetfx3setup.exe /x:c:\dotnetfx3

  3. Open the file c:\dotnetfx3\setup.sdb in a text editor such as notepad

  4. Look for the list of product codes in the [PrevProductIds] section of setup.sdb

Get more information

Can't find what you're looking for? Try Google Search!
Google
 
Web eshwar123.blogspot.com

Comments on "Detect older versions when deploying .NET Framework 2.0"