Get System Setting Windows in 64 bit Mode into ISWINDOWS64BIT
if Variable ISWINDOWS64BIT Equals FALSE
  MessageBox: $TITLE$ Setup, $TITLE$ requires a 64 bit operating system. Please upgrade your operating system and try again.$NEWLINE$$NEWLINE$$TITLE$ Setup cannot continue.
  Terminate Installation
end
 
Get System Setting Windows 8 into IS8_X64
Get System Setting Windows 8.1 into IS81_X64
Get System Setting Windows 8.1 Update 1 into IS811_X64
if Variable IS811_X64 Equals FALSE
  if Variable IS8_X64 Equals TRUE
    if Variable IS81_X64 Equals TRUE
      Comment: KB2919355 required for Windows 8.1.0
      MessageBox: $TITLE$ Setup, $TITLE$ requires KB2919355 for your operating system.$NEWLINE$$NEWLINE$Please install KB2919355 on your operating system and try again.$NEWLINE$$NEWLINE$$TITLE$ Setup cannot continue.
      Terminate Installation
    end
  end
end
if Variable IS8_X64 Equals FALSE
   
  Get System Setting Windows 2008 R2 into IS2008R2_X64
  Get System Setting Windows 2008 into IS2008_X64
   
  if Variable IS2008R2_X64 Equals TRUE
    Comment: For Win 2008 R2, at least Service Pack 1 is required
    Get System Setting Service Pack 1 into OS_SP
    if Variable OS_SP Equals FALSE
      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 IS2008_X64 Equals TRUE
      Comment: For Win 2008, at least Service Pack 2 is required
      Get System Setting Service Pack 2 into OS_SP
      if Variable OS_SP Equals FALSE
        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
      Get System Setting Windows Vista into ISVISTA_X64
      if Variable ISVISTA_X64 Equals FALSE
        Get System Setting Windows 2003 into IS2003_X64
        if Variable IS2003_X64 Equals FALSE
          Get System Setting Windows XP into ISXP_X64
           
          if Variable ISXP_X64 Equals TRUE
            Get System Setting Service Pack 3 into OS_SP
            if Variable OS_SP Equals FALSE
              MessageBox: $TITLE$, $TITLE$ requires Windows XP Service Pack 3 or higher.$NEWLINE$$NEWLINE$Setup cannot continue.
              Terminate Installation
            end
          else
            Comment: At least Windows XP is required
            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
           
        else
          Get System Setting Service Pack 2 into OS_SP
          if Variable OS_SP Equals FALSE
            MessageBox: $TITLE$, $TITLE$ requires Server 2003 Service Pack 2 or higher.$NEWLINE$$NEWLINE$Setup cannot continue.
            Terminate Installation
          end
        end
      else
        Get System Setting Windows 7 into IS7_X64
        if Variable IS7_X64 Equals FALSE
          Get System Setting Service Pack 2 into OS_SP
          if Variable OS_SP Equals FALSE
            MessageBox: $TITLE$, $TITLE$ requires Service Pack 2 or higher.$NEWLINE$$NEWLINE$Setup cannot continue.
            Terminate Installation
          end
        else
          Get System Setting Service Pack 1 into OS_SP
          if Variable OS_SP Equals FALSE
            MessageBox: $TITLE$, $TITLE$ requires Service Pack 1 or higher.$NEWLINE$$NEWLINE$Setup cannot continue.
            Terminate Installation
          end
        end
      end
    end
  end
end
 
Set x64 - Native 64 bit Windows, AMD64, EM64T, and ARM64 Architectures - installation mode
 
Set Variable MFC_RTM_TARGET_VER to 
Set Variable VC14_30_30704_RTM_X64 to TRUE
Get Folder Location System->System Directory into WINSYSDIR
Comment: Check for the MFC 140 DLL file in the system directory
Does File Exist $WINSYSDIR$\MFC140.dll (get result into variable MFC_RTM_TARGET_VER)
if Variable MFC_RTM_TARGET_VER Equals TRUE
  Get File Version $WINSYSDIR$\MFC140.dll into Variable MFC_RTM_TARGET_VER
  Set Variable MFC_RTM_PACKAGE_VER to 14.30.30704.0
  if Variable MFC_RTM_PACKAGE_VER not Greater Than (Version) $MFC_RTM_TARGET_VER$
    Set Variable VC14_30_30704_RTM_X64 to FALSE
  end
else
  Set Variable VC14_30_30704_RTM_X64 to TRUE
end
 
Comment: Set Win32 - Native 32 bit Windows and Windows 32 on Windows 64 (WOW64) - installation mode
 
if Variable VC14_30_30704_RTM_X64 Equals TRUE
  Set Variable PREREQ to TRUE
  Set Variable PRELIST to $PRELIST$$NEWLINE$Microsoft Visual C++ Runtime for Visual Studio 2022 v.17 (x64)
end
 
