if Variable NET351 Equals FALSE
  Set Variable PROGRESSTEXT to Installing Microsoft .NET Framework 3.5 Service Pack 1
  Set Variable NET351_FILEBAG to 
  Set Variable NET351_RESULT to 
  Set Variable NET351_ERROR to 
  Get Common Folder Location Special->Boot Path into NET351_BOOTPATH
  Comment: Define File Bag : #IADIR#\runtimes\NET351bin\*.*, include files recursively, get runtime location of files into variable NET351_FILEBAG
  Define File Bag : #IADIR#\runtimes\NET351bin.7zip, include files recursively, get runtime location of files into variable NET351_FILEBAG
  Extract 7Zip Archive $NET351_FILEBAG$\net351bin.7zip into folder $NET351_BOOTPATH$ (get result into variable NET351_EXTRACT)
  if Variable NET351_EXTRACT not Equals SUCCESS
    MessageBox: $TITLE$ Setup, Unable to extract temporary files for Microsoft .NET Framework 3.5 Service Pack 1 installation. $NET351_EXTRACT$$NEWLINE$$NEWLINE$Please free up some space on your boot drive and try again.$NEWLINE$$NEWLINE$$TITLE$ Setup cannot continue.
    Terminate Installation
  end
  Install/Remove MSI Package $NET351_BOOTPATH$\net351bin\vs_setup.msi[VSEXTUI=1] (get result into variable NET351_RESULT)
  Comment: Install/Remove MSI Package $NET351_FILEBAG$\vs_setup.msi[VSEXTUI=1] (get result into variable NET351_RESULT)
  Recursively Delete Files $NET351_BOOTPATH$\net351bin\*.*
  Call DLL Function kernel32.dll->RemoveDirectoryA
  if Variable NET351_RESULT 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 NET351_RESULT Equals ERROR
    MessageBox: $TITLE$ Setup, Microsoft .NET Framework 3.5 Service Pack 1 could not be installed. $NET351_ERROR$$NEWLINE$$NEWLINE$Please use Windows Update to manually install this update on your system.$NEWLINE$$NEWLINE$$TITLE$ Setup cannot continue.
    Terminate Installation
  end
end
 
