This is an example script file for installing the .NET 2.0 Framework on Windows using INNO Setup. It includes checking for the existance of the framework, and installing it when needed. It also offers several additional checks before installing, like Windows version, SP level, MSI Installer Version, IE Version, If user is running with admin rights, etc..
This file is accompanied by an article explaining it, which can be found here.