if Variable DOTNET40_X86 Equals FALSE
  Set Variable PROGRESSTEXT to Installing Microsoft .NET Framework 4.0 
  Set Variable DOTNET40_FILEBAG_X86 to 
  Set Variable DOTNET40_RESULT_X86 to 
  Set Variable DOTNET40_ERROR_X86 to 
  Get Common Folder Location Special->Boot Path into DOTNET40_BOOTPATH_X86
  Define File Bag : #IADIR#\runtimes\netfx_extended_x86\*.*, include files recursively, get runtime location of files into variable DOTNET40_FILEBAG_X86
  Install/Remove MSI Package $DOTNET40_FILEBAG_X86$\netfx_extended_x86.msi[VSEXTUI=1 TRANSFORMS=netfx4_aip.mst] (get result into variable DOTNET40_RESULT_X86)
  if Variable DOTNET40_RESULT_X86 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
  if Variable DOTNET40_RESULT_X86 Equals ERROR
    MessageBox: $TITLE$ Setup, Microsoft .NET Framework 4.0 could not be installed. $DOTNET40_ERROR_X86$$NEWLINE$$NEWLINE$Please use Windows Update to manually install this update on your system.$NEWLINE$$NEWLINE$$TITLE$ Setup cannot continue.
    Terminate Installation
  end
end
 
