if Variable NET30 Equals FALSE
  Set Variable NET30_FILEBAG to 
  Set Variable NET30_RESULT to 
  Set Variable NET30_ERROR to 
  Set Variable NET30_REBOOT to FALSE
  Set Variable PROGRESSTEXT to Installing Microsoft .NET Framework 3.0
  Define File Bag : #IADIR#\runtimes\net30bin\*.*, include files recursively, get runtime location of files into variable NET30_FILEBAG
  Set Variable PROGRESSTEXT to Installing Microsoft Software Rasterizer for DirectX 9.0 SDK
  Install/Remove MSI Package $NET30_FILEBAG$\rgbrast_x86\RGB9RAST_x86.msi[ADDLOCAL=ALL] (get result into variable NET30_RESULT)
  if Variable NET30_RESULT Equals ERROR
    MessageBox: $TITLE$ Setup, Microsoft Software Rasterizer for DirectX 9.0 SDK could not be installed. $NET30_ERROR$$NEWLINE$$NEWLINE$$TITLE$ Setup cannot continue.
    Terminate Installation
  else
    if Variable NET30_RESULT Equals REBOOT
      Set Variable NET30_REBOOT to TRUE
    end
  end
  Set Variable PROGRESSTEXT to Installing Microsoft .NET Framework 3.0 Runtime
  Install/Remove MSI Package $NET30_FILEBAG$\netfx3\VS_Setup.msi[ADDLOCAL=ALL ADDEPLOY=1] (get result into variable NET30_RESULT)
  if Variable NET30_RESULT Equals ERROR
    MessageBox: $TITLE$ Setup, Microsoft .NET Framework 3.0 could not be installed. $NET30_ERROR$$NEWLINE$$NEWLINE$$TITLE$ Setup cannot continue.
    Terminate Installation
  else
    if Variable NET30_RESULT Equals REBOOT
      Set Variable NET30_REBOOT to TRUE
    end
  end
  Set Variable PROGRESSTEXT to Installing Microsoft Windows Communication Foundation
  Install/Remove MSI Package $NET30_FILEBAG$\wcf_x86\wcf.msi[ADDLOCAL=ALL] (get result into variable NET30_RESULT)
  if Variable NET30_RESULT Equals ERROR
    MessageBox: $TITLE$ Setup, Microsoft Windows Communication Foundation could not be installed. $NET30_ERROR$$NEWLINE$$NEWLINE$$TITLE$ Setup cannot continue.
    Terminate Installation
  else
    if Variable NET30_RESULT Equals REBOOT
      Set Variable NET30_REBOOT to TRUE
    end
  end
  Set Variable PROGRESSTEXT to Installing Microsoft Windows Presentation Foundation
  Install/Remove MSI Package $NET30_FILEBAG$\wpf_x86\wpf.msi[ADDLOCAL=ALL] (get result into variable NET30_RESULT)
  if Variable NET30_RESULT Equals ERROR
    MessageBox: $TITLE$ Setup, Microsoft Windows Presentation Foundation could not be installed. $NET30_ERROR$$NEWLINE$$NEWLINE$$TITLE$ Setup cannot continue.
    Terminate Installation
  else
    if Variable NET30_RESULT Equals REBOOT
      Set Variable NET30_REBOOT to TRUE
    end
  end
  Set Variable PROGRESSTEXT to Installing Microsoft Windows Workflow Foundation
  Install/Remove MSI Package $NET30_FILEBAG$\wf_x86\Wf_3.0_x86.msi[ADDLOCAL=ALL] (get result into variable NET30_RESULT)
  if Variable NET30_RESULT Equals ERROR
    MessageBox: $TITLE$ Setup, Microsoft Windows Workflow Foundation could not be installed. $NET30_ERROR$$NEWLINE$$NEWLINE$$TITLE$ Setup cannot continue.
    Terminate Installation
  else
    if Variable NET30_RESULT Equals REBOOT
      Set Variable NET30_REBOOT to TRUE
    end
  end
  Get System Setting Service Pack 3 into NET30_SP3
  if Variable NET30_SP3 Equals FALSE
    Set Variable PROGRESSTEXT to Installing Microsoft Windows Imaging Component
    Set Variable PROGRESSMODE to MARQUEE
    Run Program $NET30_FILEBAG$\wic\update\update.exe /quiet /norestart (WAIT, get result into variable NET30_RESULT)
    Set Variable PROGRESSMODE to 
    if Variable NET30_RESULT Equals 3010
      Set Variable NET30_REBOOT to TRUE
    else
      if Variable NET30_RESULT not Equals 0
        MessageBox: $TITLE$ Setup, Microsoft Windows Imaging Component could not be installed.$NEWLINE$$NEWLINE$$TITLE$ Setup cannot continue.
        Terminate Installation
      end
    end
  end
  Set Variable PROGRESSTEXT to Installing Microsoft XML Paper Specification
  Set Variable PROGRESSMODE to MARQUEE
  Run Program $NET30_FILEBAG$\xps\update\update.exe /quiet /norestart (WAIT, get result into variable NET30_RESULT)
  Set Variable PROGRESSMODE to 
  if Variable NET30_RESULT Equals 3010
    Set Variable NET30_REBOOT to TRUE
  else
    if Variable NET30_RESULT not Equals 0
      MessageBox: $TITLE$ Setup, Microsoft XML Paper Specification could not be installed.$NEWLINE$$NEWLINE$$TITLE$ Setup cannot continue.
      Terminate Installation
    end
  end
  if Variable NET30_REBOOT Equals REBOOT
    MessageBox: $TITLE$ Setup, Your computer needs to be restarted before $TITLE$ Setup can continue.$NEWLINE$$NEWLINE$Please save your work in all running programs and click OK to restart your computer. Setup will resume once your computer restarts.$NEWLINE$$NEWLINE$If you click CANCEL, setup will exit. You will have to run setup again at a later time to install $TITLE$.
    if Variable REBOOTNOW Equals OK
      Reboot Computer and Resume Setup
    else
      Terminate Installation
    end
  end
end
 
