How to detect old versions when deploying the .NET Framework 3.0 (formerly WinFX)
I received an interesting question from a customer this weekend. They are working on a setup package that will include the .NET Framework 3.0 (formerly the WinFX runtime components) as a prerequisite, and they wanted to automatically run the vs_uninst_winfx.exe cleanup tool to make sure that there were not any previous beta versions on the system that would cause setup to fail. This cleanup tool does not have any silent switches, and it is only designed as an end user tool and not a redistributable setup component, so I advised the customer against including this.
However, it is possible to implement logic in a setup wrapper to accomplish the underlying goal of ensuring that no previous beta versions are present on the system. I previously outlined an algorithm to accomplish this for the .NET Framework 2.0, and a similar algorithm will also work for the .NET Framework 3.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:
-
Download the .NET Framework 3.0 web download bootstrapper and save it to your hard drive
-
Extract the contents by running dotnetfx3setup.exe /x:c:\dotnetfx3
-
Open the file c:\dotnetfx3\setup.sdb in a text editor such as notepad
-
Look for the list of product codes in the [PrevProductIds] section of setup.sdb
Recent Posts
- Understanding API First Strategy and Benefits
- Frankenstein APIs Explained! - API Cyber Security Series
- API Security 101 - Cyber Security Explained
- API Trends 2022 - API Security and Cybersecurity
- API Trends 2022 - Seamless Integration Solutions
- API Trends 2022 - Adaptive API Management
- API Trends 2022 - API Integration Automation
- API Trends 2022 - Industry Specific Breakouts
- API Trends 2022 - API Best Practices
- API Trends 2022 - Open API Standards
- API Trends 2022 - API Integration Experience
- API Trends 2022 - API-Led Modernization
- API Trends 2022 - API Economy Growth
- Brenton House - Give your App and APIs a Turbo Boost – Part 2
- Easily Enable Speech Recognition in Titanium iOS using Hyperloop
Tag Cloud
- .NET
- adaptive api management
- android
- api
- api automation
- api best practices
- api economy
- api experience
- api first
- api integration
- api integrations
- api management
- api security
- api standards
- api strategy
- api trends
- apis
- appcelerator
- automation
- boot
- Brenton House
- C#
- Cisco VPN
- Cloud
- Community News
- Continuous Integration
- crash
- cybersecurity
- Dropbox
- fhir apis
- Free Stuff
- General Software Development
- Google Drive
- graphql
- healthcare apis
- houserules
- hyperloop
- ios
- json schema
- Live Mesh
- Mac OS X
- Microsoft
- mobile
- mobile api
- native
- open banking
- openapi
- Other Stuff
- SkyDrive
- speech
- Stuff
- swagger
- Team Systems
- titanium native
- titanium turbo
- Unit Testing
- Vista
- Visual Studio
- Visual Studio 11
- voice
- win7
- Windows 7
- Windows 8
- windows update