Read Registry Key HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.0\Setup\InstallSuccess into NET30
if Variable NET30 Equals 1
  Set Variable NET30 to TRUE
else
  Set Variable NET30 to FALSE
end
if Variable NET30 Equals FALSE
  Get System Setting Windows Vista into NET30_ISVISTA
  Get System Setting Windows 2003 into NET30_IS2003
  Get System Setting Windows XP into NET30_ISXP
  Get System Setting Service Pack 1 into NET30_SP1
  Get System Setting Service Pack 2 into NET30_SP2
  if Variable NET30_ISVISTA Equals FALSE
    if Variable NET30_IS2003 Equals TRUE
      if Variable NET30_SP1 Equals FALSE
        Comment: .NET 3.0 Requires Service Pack 1 on Server 2003
        MessageBox: $TITLE$ Setup, $TITLE$ requires at least Service Pack 1 or later. Please upgrade your operating system and try again.$NEWLINE$$NEWLINE$$TITLE$ Setup cannot continue.
        Terminate Installation
      end
    else
      if Variable NET30_ISXP Equals TRUE
        if Variable NET30_SP2 Equals FALSE
          Comment: .NET 3.0 Requires Service Pack 2 on XP
          MessageBox: $TITLE$ Setup, $TITLE$ requires at least Service Pack 2 or later. Please upgrade your operating system and try again.$NEWLINE$$NEWLINE$$TITLE$ Setup cannot continue.
          Terminate Installation
        end
      else
        Comment: .NET 3.0 Not Supported on Windows 2000 or Older
        MessageBox: $TITLE$ Setup, $TITLE$ requires at least Windows XP or later. Please upgrade your operating system and try again.$NEWLINE$$NEWLINE$$TITLE$ Setup cannot continue.
        Terminate Installation
      end
    end
  else
    Comment: .NET 3.0 Must Have Been Pre-Installed on Vista Already
    MessageBox: $TITLE$ Setup, $TITLE$ requires Microsoft .NET Framework 3.0 which is pre-installed with your operating system. Please repair your operating system and try again.$NEWLINE$$NEWLINE$$TITLE$ Setup cannot continue.
    Terminate Installation
  end
  Set Variable PREREQ to TRUE
  Set Variable PRELIST to $PRELIST$$NEWLINE$Microsoft .NET Framework 3.0
end
 
