if Variable DOTNET30_X64 Equals FALSE
  Set x64 - Native 64 bit Windows, AMD64 and EM64T Architectures - installation mode
  Set Variable DOTNET30_FILEBAG_X64 to 
  Set Variable DOTNET30_RESULT_X64 to 
  Set Variable DOTNET30_ERROR_X64 to 
  Set Variable DOTNET30_REBOOT_X64 to FALSE
  Set Variable PROGRESSTEXT to Installing Microsoft .NET Framework 3.0 (x64)
  Define File Bag : #IADIR#\runtimes\net30bin_x64\*.*, include files recursively, get runtime location of files into variable DOTNET30_FILEBAG_X64
  Set Variable PROGRESSTEXT to Installing Microsoft Software Rasterizer for DirectX 9.0 SDK (x64)
  Install/Remove MSI Package $DOTNET30_FILEBAG_X64$\RGBRAST_x64\RGB9RAST_x64.msi[ADDLOCAL=ALL] (get result into variable DOTNET30_RESULT_X64)
  if Variable DOTNET30_RESULT_X64 Equals ERROR
    MessageBox: $TITLE$ Setup, Microsoft Software Rasterizer for DirectX 9.0  SDK (x64) could not be installed. $DOTNET30_ERROR_X64$$NEWLINE$$NEWLINE$$TITLE$ Setup cannot continue.
    Terminate Installation
  else
    if Variable DOTNET30_RESULT_X64 Equals REBOOT
      Set Variable DOTNET30_REBOOT_X64 to TRUE
    end
  end
  Set Variable PROGRESSTEXT to Installing Microsoft .NET Framework 3.0 Runtime (x64)
  Set Variable DOTNET30_VISTA_X64 to 
  Get System Setting Windows Vista into DOTNET30_VISTA_X64
  if Variable DOTNET30_VISTA_X64 Equals TRUE
    Set Variable PROGRESSMODE to MARQUEE
    Set Variable DOTNET30_SYSDIR_X64 to 
    Get Common Folder Location System->System Directory into DOTNET30_SYSDIR_X64
    Run Program $DOTNET30_SYSDIR_X64$\pkgmgr.exe  /iu:NetFx3 /quiet /norestart (WAIT, get result into variable DOTNET30_RESULT_X64)
    Set Variable PROGRESSMODE to 
    if Variable DOTNET30_RESULT_X64 Equals 3010
      Set Variable DOTNET30_REBOOT_X64 to TRUE
    else
      if Variable DOTNET30_RESULT_X64 not Equals 0
        MessageBox: $TITLE$ Setup, Microsoft .NET Framework 3.0 (x64) could not be installed. $DOTNET30_ERROR_X64$$NEWLINE$$NEWLINE$$TITLE$ Setup cannot continue.
        Terminate Installation
      end
    end
  else
    Install/Remove MSI Package $DOTNET30_FILEBAG_X64$\NETFX3\vs_setup.msi[ADDLOCAL=ALL ADDEPLOY=1] (get result into variable DOTNET30_RESULT_X64)
    if Variable DOTNET30_RESULT_X64 Equals ERROR
      MessageBox: $TITLE$ Setup, Microsoft .NET Framework 3.0 (x64) could not be installed. $DOTNET30_ERROR_X64$$NEWLINE$$NEWLINE$$TITLE$ Setup cannot continue.
      Terminate Installation
    else
      if Variable DOTNET30_RESULT_X64 Equals REBOOT
        Set Variable DOTNET30_REBOOT_X64 to TRUE
      end
    end
    Set Variable PROGRESSTEXT to Installing Microsoft Windows Communication Foundation (x64)
    Install/Remove MSI Package $DOTNET30_FILEBAG_X64$\WCF_x64\wcf_x64.msi[ADDLOCAL=ALL] (get result into variable DOTNET30_RESULT_X64)
    if Variable DOTNET30_RESULT_X64 Equals ERROR
      MessageBox: $TITLE$ Setup, Microsoft Windows Communication Foundation (x64) could not be installed. $DOTNET30_ERROR_X64$$NEWLINE$$NEWLINE$$TITLE$ Setup cannot continue.
      Terminate Installation
    else
      if Variable DOTNET30_RESULT_X64 Equals REBOOT
        Set Variable DOTNET30_REBOOT_X64 to TRUE
      end
    end
    Set Variable PROGRESSTEXT to Installing Microsoft Windows Presentation Foundation (x64)
    Install/Remove MSI Package $DOTNET30_FILEBAG_X64$\WPF_x64\wpf_x64.msi[ADDLOCAL=ALL] (get result into variable DOTNET30_RESULT_X64)
    if Variable DOTNET30_RESULT_X64 Equals ERROR
      MessageBox: $TITLE$ Setup, Microsoft Windows Presentation Foundation (x64) could not be installed. $DOTNET30_ERROR_X64$$NEWLINE$$NEWLINE$$TITLE$ Setup cannot continue.
      Terminate Installation
    else
      if Variable DOTNET30_RESULT_X64 Equals REBOOT
        Set Variable DOTNET30_REBOOT_X64 to TRUE
      end
    end
    Set Variable PROGRESSTEXT to Installing Microsoft Windows Workflow Foundation (x64)
    Install/Remove MSI Package $DOTNET30_FILEBAG_X64$\WF_x64\WF_3.0_x64.msi[ADDLOCAL=ALL] (get result into variable DOTNET30_RESULT_X64)
    if Variable DOTNET30_RESULT_X64 Equals ERROR
      MessageBox: $TITLE$ Setup, Microsoft Windows Workflow Foundation (x64) could not be installed. $DOTNET30_ERROR_X64$$NEWLINE$$NEWLINE$$TITLE$ Setup cannot continue.
      Terminate Installation
    else
      if Variable DOTNET30_RESULT_X64 Equals REBOOT
        Set Variable DOTNET30_REBOOT_X64 to TRUE
      end
    end
    Get System Setting Service Pack 3 into DOTNET30_SP3_X64
    if Variable DOTNET30_SP3_X64 Equals FALSE
      Set Variable PROGRESSTEXT to Installing Microsoft Windows Imaging Component (x64)
      Set Variable PROGRESSMODE to MARQUEE
      Run Program $DOTNET30_FILEBAG_X64$\WIC\update\update.exe /quiet /norestart (WAIT, get result into variable DOTNET30_RESULT_X64)
      Set Variable PROGRESSMODE to 
      if Variable DOTNET30_RESULT_X64 Equals 3010
        Set Variable DOTNET30_REBOOT_X64 to TRUE
      else
        if Variable DOTNET30_RESULT_X64 not Equals 0
          MessageBox: $TITLE$ Setup, Microsoft Windows Imaging Component (x64) could not be installed.$NEWLINE$$NEWLINE$$TITLE$ Setup cannot continue.
          Terminate Installation
        end
      end
    end
    Set Variable PROGRESSTEXT to Installing Microsoft XML Paper Specification (x64)
    Set Variable PROGRESSMODE to MARQUEE
    Run Program $DOTNET30_FILEBAG_X64$\XPS\update\update.exe /quiet /norestart (WAIT, get result into variable DOTNET30_RESULT_X64)
    Set Variable PROGRESSMODE to 
    if Variable DOTNET30_RESULT_X64 Equals 3010
      Set Variable DOTNET30_REBOOT_X64 to TRUE
    else
      if Variable DOTNET30_RESULT_X64 not Equals 0
        MessageBox: $TITLE$ Setup, Microsoft XML Paper Specification (x64) could not be installed.$NEWLINE$$NEWLINE$$TITLE$ Setup cannot continue.
        Terminate Installation
      end
    end
  end
  if Variable DOTNET30_REBOOT_X64 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
  Set Win32 - Native 32 bit Windows and Windows 32 on Windows 64 (WOW64) - installation mode
end
 
