Advertisement
Nologic

WSUS Offline Update Rev 5

Jul 7th, 2015
421
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AutoIt 80.98 KB | None | 0 0
  1. ; ***  WSUS Offline Update 9.7 - Generator  ***
  2. ; ***       Author: T. Wittrock, Kiel       ***
  3. ; ***     USB-Option added by Ch. Riedel    ***
  4. ; ***   Dialog scaling added by Th. Baisch  ***
  5.  
  6. #include <GUIConstants.au3>
  7. #include <Array.au3>
  8.  
  9. #pragma compile( CompanyName      , 'T. Wittrock' )
  10. #pragma compile( FileDescription  , 'WSUS Offline Update Generator' )
  11. #pragma compile( FileVersion      , 9.7.0.669 )
  12. #pragma compile( InternalName     , 'Generator' )
  13. #pragma compile( LegalCopyright   , 'GNU GPLv3' )
  14. #pragma compile( OriginalFilename , UpdateGenerator.exe )
  15. #pragma compile( ProductName      , 'WSUS Offline Update' )
  16. #pragma compile( ProductVersion   , 9.7.0 )
  17.  
  18. AutoItSetOption( 'GUICloseOnESC' , 0 )
  19. AutoItSetOption( 'TrayAutoPause' , 0 )
  20. AutoItSetOption( 'TrayIconHide'  , 1 )
  21.  
  22. Const $caption                  = 'WSUS Offline Update 9.7'
  23. Const $title                    = $caption & ' - Generator'
  24. Const $donationURL              = 'http://www.wsusoffline.net/donate.html'
  25. Const $downloadLogFile          = 'download.log'
  26. Const $runAllFile               = 'RunAll.cmd'
  27.  
  28. ; Registry constants
  29. Const $reg_key_hkcu_desktop     = 'HKEY_CURRENT_USER\Control Panel\Desktop'
  30. Const $reg_key_hkcu_winmetrics  = 'HKEY_CURRENT_USER\Control Panel\Desktop\WindowMetrics'
  31. Const $reg_val_logpixels        = 'LogPixels'
  32. Const $reg_val_applieddpi       = 'AppliedDPI'
  33.  
  34. ; Message box return codes
  35. Const $msgbox_btn_ok            = 1
  36. Const $msgbox_btn_cancel        = 2
  37. Const $msgbox_btn_abort         = 3
  38. Const $msgbox_btn_retry         = 4
  39. Const $msgbox_btn_ignore        = 5
  40. Const $msgbox_btn_yes           = 6
  41. Const $msgbox_btn_no            = 7
  42. Const $msgbox_btn_tryagain      = 10
  43. Const $msgbox_btn_continue      = 11
  44.  
  45. ; Defaults
  46. Const $default_logpixels        = 96
  47.  
  48. ; INI file constants
  49. Const $ini_section_w2k3         = "Windows Server 2003"
  50. Const $ini_section_w2k3_x64     = "Windows Server 2003 x64"
  51. Const $ini_section_w60          = "Windows Vista"
  52. Const $ini_section_w60_x64      = "Windows Vista x64"
  53. Const $ini_section_w61          = "Windows 7"
  54. Const $ini_section_w61_x64      = "Windows Server 2008 R2"
  55. Const $ini_section_w62          = "Windows 8"
  56. Const $ini_section_w62_x64      = "Windows Server 2012"
  57. Const $ini_section_w63          = "Windows 8.1"
  58. Const $ini_section_w63_x64      = "Windows Server 2012 R2"
  59. Const $ini_section_o2k7         = "Office 2007"
  60. Const $ini_section_o2k10        = "Office 2010"
  61. Const $ini_section_o2k13        = "Office 2013"
  62. Const $ini_section_iso          = "ISO Images"
  63. Const $ini_section_usb          = "USB Images"
  64. Const $ini_section_opts         = "Options"
  65. Const $ini_section_misc         = "Miscellaneous"
  66. Const $enabled                  = "Enabled"
  67. Const $disabled                 = "Disabled"
  68. Const $iso_token_cd             = "single"
  69. Const $iso_token_dvd            = "cross-platform"
  70. Const $iso_token_skiphashes     = "skiphashes"
  71. Const $usb_token_copy           = "copy"
  72. Const $usb_token_path           = "path"
  73. Const $usb_token_cleanup        = "cleanup"
  74. Const $opts_token_includesp     = "includesp"
  75. Const $opts_token_allowsp       = "allowsp"
  76. Const $opts_token_includedotnet = "includedotnet"
  77. Const $opts_token_allowdotnet   = "allowdotnet"
  78. Const $opts_token_wle           = "includewle"
  79. Const $opts_token_msse          = "includemsse"
  80. Const $opts_token_wddefs        = "includewddefs"
  81. Const $opts_token_cleanup       = "cleanupdownloads"
  82. Const $opts_token_verify        = "verifydownloads"
  83. Const $misc_token_proxy         = "proxy"
  84. Const $misc_token_wsus          = "wsus"
  85. Const $misc_token_wsus_only     = "wsusonly"
  86. Const $misc_token_wsus_proxy    = "wsusbyproxy"
  87. Const $misc_token_wsus_trans    = "transferwsus"
  88. Const $misc_token_skipsdd       = "skipsdd"
  89. Const $misc_token_skiptz        = "skiptz"
  90. Const $misc_token_skipdownload  = "skipdownload"
  91. Const $misc_token_skipdynamic   = "skipdynamic"
  92. Const $misc_token_chkver        = "checkouversion"
  93. Const $misc_token_minimize      = "minimizeondownload"
  94. Const $misc_token_showshutdown  = "showshutdown"
  95. Const $misc_token_showdonate    = "showdonate"
  96. Const $misc_token_clt_wustat    = "WUStatusServer"
  97.  
  98. ; Paths
  99. Const $path_max_length          = 192
  100. Const $path_invalid_chars       = '!%&()^+,;='
  101. Const $paths_rel_structure      = '\bin\,\client\bin\,\client\cmd\,\client\exclude\,\client\opt\,\client\static\,\cmd\,\exclude\,\iso\,\log\,\static\,\xslt\'
  102. Const $path_rel_builddate       = '\client\builddate.txt'
  103. Const $path_rel_clientini       = '\client\UpdateInstaller.ini'
  104. Const $path_rel_win_glb         = '\client\win\glb'
  105.  
  106. Dim $maindlg , $inifilename , $tabitemfocused , $includesp , $dotnet , $wle , $msse , $wddefs , $verifydownloads , $cdiso , $dvdiso , $buildlbl
  107. Dim $usbcopy , $usbpath , $usbfsf , $usbclean , $imageonly , $scripting , $shutdown , $btn_start , $btn_proxy , $btn_wsus , $btn_donate , $btn_exit , $proxy , $proxypwd , $wsus , $dummy
  108. Dim $dlgheight , $groupwidth , $groupheight_lng , $groupheight_glb , $txtwidth , $txtheight , $slimheight , $btnwidth , $btnheight , $txtxoffset , $txtyoffset , $txtxpos , $txtypos , $runany
  109.  
  110. Global Const $aMainArray[26][5] = [ [ 25   , 'Windows'      , 'Office'           , 'Deutsch'        , 'English'      ] , _
  111.                                                 ['glb' , 'w60|w60 x64|w61|w61 x64|w62|w62 x64|w63|w63 x64'                       ] , _
  112.                                                 ['enu' , 'w2k3|w2k3 x64', 'o2k7|o2k10|o2k13' , 'Englisch'       , 'English'      ] , _
  113.                                                 ['fra' , 'w2k3|w2k3 x64', 'o2k7|o2k10|o2k13' , 'Französisch'    , 'French'       ] , _
  114.                                                 ['esn' , 'w2k3|w2k3 x64', 'o2k7|o2k10|o2k13' , 'Spanisch'       , 'Spanish'      ] , _
  115.                                                 ['jpn' , 'w2k3|w2k3 x64', 'o2k7|o2k10|o2k13' , 'Japanisch'      , 'Japanese'     ] , _
  116.                                                 ['kor' , 'w2k3|w2k3 x64', 'o2k7|o2k10|o2k13' , 'Koreanisch'     , 'Korean'       ] , _
  117.                                                 ['rus' , 'w2k3|w2k3 x64', 'o2k7|o2k10|o2k13' , 'Russisch'       , 'Russian'      ] , _
  118.                                                 ['ptg' , 'w2k3'         , 'o2k7|o2k10|o2k13' , 'Portugiesisch'  , 'Portuguese'   ] , _
  119.                                                 ['ptb' , 'w2k3|w2k3 x64', 'o2k7|o2k10|o2k13' , 'Brasilianisch'  , 'Brazilian'    ] , _
  120.                                                 ['deu' , 'w2k3|w2k3 x64', 'o2k7|o2k10|o2k13' , 'Deutsch'        , 'German'       ] , _
  121.                                                 ['nld' , 'w2k3'         , 'o2k7|o2k10|o2k13' , 'Niederländisch' , 'Dutch'        ] , _
  122.                                                 ['ita' , 'w2k3'         , 'o2k7|o2k10|o2k13' , 'Italienisch'    , 'Italian'      ] , _
  123.                                                 ['chs' , 'w2k3'         , 'o2k7|o2k10|o2k13' , 'Chin. (simpl.)' , 'Chinese (s.)' ] , _
  124.                                                 ['cht' , 'w2k3'         , 'o2k7|o2k10|o2k13' , 'Chin. (trad.)'  , 'Chinese (tr.)'] , _
  125.                                                 ['plk' , 'w2k3'         , 'o2k7|o2k10|o2k13' , 'Polnisch'       , 'Polish'       ] , _
  126.                                                 ['hun' , 'w2k3'         , 'o2k7|o2k10|o2k13' , 'Ungarisch'      , 'Hungarian'    ] , _
  127.                                                 ['csy' , 'w2k3'         , 'o2k7|o2k10|o2k13' , 'Tschechisch'    , 'Czech'        ] , _
  128.                                                 ['sve' , 'w2k3'         , 'o2k7|o2k10|o2k13' , 'Schwedisch'     , 'Swedish'      ] , _
  129.                                                 ['trk' , 'w2k3'         , 'o2k7|o2k10|o2k13' , 'Türkisch'       , 'Turkish'      ] , _
  130.                                                 ['ell' , 'w2k3'         , 'o2k7|o2k10|o2k13' , 'Griechisch'     , 'Greek'        ] , _
  131.                                                 ['ara' , 'w2k3'         , 'o2k7|o2k10|o2k13' , 'Arabisch'       , 'Arabic'       ] , _
  132.                                                 ['heb' , 'w2k3'         , 'o2k7|o2k10|o2k13' , 'Hebräisch'      , 'Hebrew'       ] , _
  133.                                                 ['dan' , 'w2k3'         , 'o2k7|o2k10|o2k13' , 'Dänisch'        , 'Danish'       ] , _
  134.                                                 ['nor' , 'w2k3'         , 'o2k7|o2k10|o2k13' , 'Norwegisch'     , 'Norwegian'    ] , _
  135.                                                 ['fin' , 'w2k3'         , 'o2k7|o2k10|o2k13' , 'Finnisch'       , 'Finnish'      ] ]
  136.  
  137. ; Create Language Tokens ex. $lang_token_glb
  138. For $ii = 1 To $aMainArray[0][0]
  139.     If $aMainArray[$ii][0] <> '' Then
  140.         Assign( 'lang_token_' & $aMainArray[$ii][0] , $aMainArray[$ii][0] , 2 )
  141.     EndIf
  142. Next
  143.  
  144. Func ShowGUIInGerman()
  145.     If $CmdLine[0] > 0 Then
  146.         If StringLower( $CmdLine[1] ) = 'deu' Then
  147.             Return True
  148.         Else
  149.             Return False
  150.         EndIf
  151.     EndIf
  152.     Return StringInStr( '0007|0407|0807|0C07|1007|1407' , @OSLang ) > 0
  153. EndFunc
  154.  
  155. Func IsUNCPath( $path )
  156.     Return StringInStr( $path , '\\' ) > 0
  157. EndFunc
  158.  
  159. Func PathValid( $path )
  160.     Local $result , $arr_invalid , $i
  161.  
  162.     If StringLen( $path ) > $path_max_length Then
  163.         $result = False
  164.     Else
  165.         $result = True
  166.         $arr_invalid = StringSplit( $path_invalid_chars , '' )
  167.         For $i = 1 to $arr_invalid[0]
  168.             If StringInStr( $path , $arr_invalid[$i] ) > 0 Then
  169.                 $result = False
  170.                 ExitLoop
  171.             EndIf
  172.         Next
  173.     EndIf
  174.     Return $result
  175. EndFunc
  176.  
  177. Func DirectoryStructureExists()
  178.     Local $result = True , $arr_dirs
  179.  
  180.     $arr_dirs = StringSplit( $paths_rel_structure , ',' )
  181.     For $i = 1 to $arr_dirs[0]
  182.         $result = $result AND FileExists( @ScriptDir & $arr_dirs[$i] )
  183.     Next
  184.     Return $result
  185. EndFunc
  186.  
  187. Func LastDownloadRun()
  188.     Local $result
  189.  
  190.     $result = FileReadLine( @ScriptDir & $path_rel_builddate )
  191.     If @error Then $result = ShowGUIInGerman() ? '[Kein]' : '[None]'
  192.     Return $result
  193. EndFunc
  194.  
  195. Func ClientIniFileName()
  196.     Return @ScriptDir & $path_rel_clientini
  197. EndFunc
  198.  
  199. Func LanguageCaption( $token , $german )
  200.     Local $iFind = _ArraySearch( $aMainArray , $token , 1 , 0 , 0 , 0 , 1 , 0 )
  201.     If $iFind = -1 Then
  202.         Return ''
  203.     Else
  204.         If $german Then
  205.             Return $aMainArray[$iFind][3]
  206.         Else
  207.             Return $aMainArray[$iFind][4]
  208.         EndIf
  209.     EndIf
  210. EndFunc
  211.  
  212. Func IsCheckBoxChecked( $chkbox )
  213.     Return BitAND( GUICtrlRead( $chkbox ) , $GUI_CHECKED ) = $GUI_CHECKED
  214. EndFunc
  215.  
  216. Func CheckBoxStateToString( $chkbox )
  217.     If IsCheckBoxChecked( $chkbox ) Then
  218.         Return $enabled
  219.     Else
  220.         Return $disabled
  221.     EndIf
  222. EndFunc
  223.  
  224. Func IsLangOfficeChecked()
  225.     Local $aOffChkSplit
  226.  
  227.     For $ii = 1 To $aMainArray[0][0]
  228.         If $aMainArray[$ii][2] <> '' Then
  229.             $aOffChkSplit = StringSplit( $aMainArray[$ii][2] , '|' )
  230.             For $jj = 1 To $aOffChkSplit[0]
  231.                 $sCurrentVar = StringReplace( $aOffChkSplit[$jj] & ' ' & $aMainArray[$ii][0] , ' ' , '_' )
  232.                 If IsCheckBoxChecked( Eval( $sCurrentVar )) Then
  233.                     Return True
  234.                 EndIf
  235.             Next
  236.         EndIf
  237.     Next
  238. EndFunc
  239.  
  240. Func SwitchDownloadTargets( $state )
  241.     Local $aWinDwnSplit
  242.  
  243.     ; Windows
  244.     For $ii = 1 To $aMainArray[0][0]
  245.         If StringInStr( 'ell|ara|heb|dan|nor|fin' , $aMainArray[$ii][0] ) > 0 Then ContinueLoop
  246.         If $aMainArray[$ii][1] <> '' Then
  247.             $aWinDwnSplit = StringSplit( $aMainArray[$ii][1] , '|' )
  248.             For $jj = 1 To $aWinDwnSplit[0]
  249.                 $sCurrentVar = StringReplace( $aWinDwnSplit[$jj] & ' ' & $aMainArray[$ii][0] , ' ' , '_' )
  250.                 GUICtrlSetState( Eval( $sCurrentVar ) , $state )
  251.             Next
  252.         EndIf
  253.     Next
  254.  
  255.     ; Office
  256.     For $ii = 1 To $aMainArray[0][0]
  257.         If $aMainArray[$ii][2] <> '' Then
  258.             $aOffDwnSplit = StringSplit( $aMainArray[$ii][2] , '|' )
  259.             For $jj = 1 To $aOffDwnSplit[0]
  260.                 $sCurrentVar = StringReplace( $aOffDwnSplit[$jj] & ' ' & $aMainArray[$ii][0] , ' ' , '_' )
  261.                 GUICtrlSetState( Eval( $sCurrentVar ) , $state )
  262.             Next
  263.         EndIf
  264.     Next
  265.     Return 0
  266. EndFunc
  267.  
  268. Func DisableGUI()
  269.     SwitchDownloadTargets( $GUI_DISABLE )
  270.  
  271.     GUICtrlSetState( $verifydownloads , $GUI_DISABLE )
  272.     GUICtrlSetState( $includesp       , $GUI_DISABLE )
  273.     GUICtrlSetState( $dotnet          , $GUI_DISABLE )
  274.     GUICtrlSetState( $wle             , $GUI_DISABLE )
  275.     GUICtrlSetState( $msse            , $GUI_DISABLE )
  276.     GUICtrlSetState( $wddefs          , $GUI_DISABLE )
  277.  
  278.     GUICtrlSetState( $cdiso      , $GUI_DISABLE )
  279.     GUICtrlSetState( $dvdiso     , $GUI_DISABLE )
  280.     GUICtrlSetState( $usbcopy    , $GUI_DISABLE )
  281.     GUICtrlSetState( $usbpath    , $GUI_DISABLE )
  282.     GUICtrlSetState( $usbfsf     , $GUI_DISABLE )
  283.     GUICtrlSetState( $usbclean   , $GUI_DISABLE )
  284.  
  285.     GUICtrlSetState( $btn_start  , $GUI_DISABLE )
  286.     GUICtrlSetState( $imageonly  , $GUI_DISABLE )
  287.     GUICtrlSetState( $scripting  , $GUI_DISABLE )
  288.     GUICtrlSetState( $shutdown   , $GUI_DISABLE )
  289.     GUICtrlSetState( $btn_proxy  , $GUI_DISABLE )
  290.     GUICtrlSetState( $btn_wsus   , $GUI_DISABLE )
  291.     GUICtrlSetState( $btn_donate , $GUI_DISABLE )
  292.     GUICtrlSetState( $btn_exit   , $GUI_DISABLE )
  293.  
  294.     Return 0
  295. EndFunc
  296.  
  297. Func EnableGUI()
  298.     SwitchDownloadTargets( $GUI_ENABLE )
  299.     If IniRead( $inifilename , $ini_section_misc , $misc_token_skipdownload , $disabled ) = $disabled AND NOT IsCheckBoxChecked( $imageonly ) Then
  300.         GUICtrlSetState( $verifydownloads , $GUI_ENABLE )
  301.     EndIf
  302.     GUICtrlSetState( $dotnet , $GUI_ENABLE )
  303.     If IniRead( $inifilename , $ini_section_misc , $misc_token_skipdownload , $disabled ) = $disabled Then
  304.         GUICtrlSetState( $includesp , $GUI_ENABLE )
  305.         GUICtrlSetState( $wle       , $GUI_ENABLE )
  306.         GUICtrlSetState( $msse      , $GUI_ENABLE )
  307.         GUICtrlSetState( $wddefs    , $GUI_ENABLE )
  308.         GUICtrlSetState( $cdiso     , $GUI_ENABLE )
  309.         GUICtrlSetState( $dvdiso    , $GUI_ENABLE )
  310.         GUICtrlSetState( $usbcopy   , $GUI_ENABLE )
  311.         If IsCheckBoxChecked( $usbcopy ) Then
  312.             GUICtrlSetState( $usbpath  , $GUI_ENABLE )
  313.             GUICtrlSetState( $usbfsf   , $GUI_ENABLE )
  314.             GUICtrlSetState( $usbclean , $GUI_ENABLE )
  315.         EndIf
  316.     EndIf
  317.     GUICtrlSetState( $btn_start , $GUI_ENABLE )
  318.     GUICtrlSetState( $scripting , $GUI_ENABLE )
  319.     If IniRead( $inifilename , $ini_section_misc , $misc_token_skipdownload , $disabled ) = $disabled Then
  320.         GUICtrlSetState( $imageonly , $GUI_ENABLE )
  321.         If NOT IsCheckBoxChecked( $imageonly ) Then GUICtrlSetState( $shutdown , $GUI_ENABLE )
  322.     EndIf
  323.     GUICtrlSetState( $btn_proxy , $GUI_ENABLE )
  324.     If IniRead( $inifilename , $ini_section_misc , $misc_token_skipdownload , $disabled ) = $disabled AND _
  325.         IniRead( $inifilename , $ini_section_misc , $misc_token_skipdynamic  , $disabled ) = $disabled Then
  326.         GUICtrlSetState( $btn_wsus , $GUI_ENABLE )
  327.     EndIf
  328.     GUICtrlSetState( $btn_donate , $GUI_ENABLE )
  329.     GUICtrlSetState( $btn_exit   , $GUI_ENABLE )
  330.     Return 0
  331. EndFunc
  332.  
  333. Func RFC1738EncodedString( $str )
  334.     Local $result
  335.  
  336.     For $i = 1 to StringLen( $str )
  337.         If StringIsAlNum( StringMid( $str , $i , 1 )) Then
  338.             $result &= StringMid( $str , $i , 1 )
  339.         Else
  340.             $result &= '%' & Hex( Asc( StringMid( $str , $i , 1 )) , 2 )
  341.         EndIf
  342.     Next
  343.     Return $result
  344. EndFunc
  345.  
  346. Func AuthProxy( $strproxy , $strproxypwd )
  347.     Local $result , $pos
  348.  
  349.     $result = $strproxy
  350.     $pos = StringInStr( $strproxy , ':@' )
  351.     If $pos > 0 AND $strproxypwd <> '' Then
  352.         $result = StringLeft( $strproxy , $pos ) & $strproxypwd & StringRight( $strproxy , StringLen( $strproxy ) - $pos )
  353.     EndIf
  354.     Return $result
  355. EndFunc
  356.  
  357. Func DetermineDownloadSwitches( $chkbox_includesp , $chkbox_dotnet , $chkbox_wle , $chkbox_msse , $chkbox_wddefs , $chkbox_verifydownloads , $strproxy , $strwsus )
  358.     Local $result
  359.  
  360.     If NOT IsCheckBoxChecked( $chkbox_includesp )   Then $result &= ' /excludesp'
  361.     If IsCheckBoxChecked( $chkbox_dotnet )          Then $result &= ' /includedotnet'
  362.     If IsCheckBoxChecked( $chkbox_wle    )          Then $result &= ' /includewle'
  363.     If IsCheckBoxChecked( $chkbox_msse   )          Then $result &= ' /includemsse'
  364.     If IsCheckBoxChecked( $chkbox_wddefs )          Then $result &= ' /includewddefs'
  365.     If IsCheckBoxChecked( $chkbox_verifydownloads ) Then $result &= ' /verify'
  366.     If NOT IsCheckBoxChecked( $scripting )          Then $result &= ' /exitonerror'
  367.     If IniRead( $inifilename , $ini_section_opts , $opts_token_cleanup , $enabled  ) = $disabled Then $result &= ' /nocleanup'
  368.     If IniRead( $inifilename , $ini_section_misc , $misc_token_skipsdd , $disabled ) = $enabled  Then $result &= ' /skipsdd'
  369.     If IniRead( $inifilename , $ini_section_misc , $misc_token_skiptz  , $disabled ) = $enabled  Then $result &= ' /skiptz'
  370.     If IniRead( $inifilename , $ini_section_misc , $misc_token_skipdownload , $disabled ) = $enabled Then
  371.         $result &= ' /skipdownload'
  372.     Else
  373.         If IniRead( $inifilename , $ini_section_misc , $misc_token_skipdynamic , $disabled ) = $enabled Then $result &= ' /skipdynamic'
  374.     EndIf
  375.     If $strproxy <> '' Then $result &= ' /proxy ' & $strproxy
  376.     If $strwsus  <> '' Then $result &= ' /wsus '  & $strwsus
  377.     If IniRead( $inifilename , $ini_section_misc , $misc_token_wsus_only  , $disabled ) = $enabled Then $result &= ' /wsusonly'
  378.     If IniRead( $inifilename , $ini_section_misc , $misc_token_wsus_proxy , $disabled ) = $enabled Then $result &= ' /wsusbyproxy'
  379.     Return $result
  380. EndFunc
  381.  
  382. Func DetermineISOSwitches( $chkbox_includesp , $chkbox_dotnet , $chkbox_wle , $chkbox_msse , $chkbox_wddefs , $chkbox_usbclean )
  383.     Local $result
  384.  
  385.     If NOT IsCheckBoxChecked( $chkbox_includesp ) Then $result &= ' /excludesp'
  386.     If IsCheckBoxChecked( $chkbox_dotnet   ) Then $result &= ' /includedotnet'
  387.     If IsCheckBoxChecked( $chkbox_wle      ) Then $result &= ' /includewle'
  388.     If IsCheckBoxChecked( $chkbox_msse     ) Then $result &= ' /includemsse'
  389.     If IsCheckBoxChecked( $chkbox_wddefs   ) Then $result &= ' /includewddefs'
  390.     If IsCheckBoxChecked( $chkbox_usbclean ) Then $result &= ' /cleanup'
  391.     If NOT IsCheckBoxChecked( $scripting   ) Then $result &= ' /exitonerror'
  392.     If IniRead( $inifilename , $ini_section_iso , $iso_token_skiphashes , $disabled ) = $enabled Then $result &= ' /skiphashes'
  393.     Return $result
  394. EndFunc
  395.  
  396. Func ShowLogFile()
  397.     Run( 'notepad.exe "' & @ScriptDir & '\log\' & $downloadLogFile & '"' )
  398. EndFunc
  399.  
  400. Func ShowRunAll()
  401.     Run( 'notepad.exe "' & @ScriptDir & '\cmd\custom\' & $runAllFile & '"' )
  402. EndFunc
  403.  
  404. Func RunVersionCheck( $strproxy )
  405.     Local $result
  406.  
  407.     DisableGUI()
  408.     If $strproxy = '' Then
  409.         $result = RunWait( @ComSpec & ' /D /C CheckOUVersion.cmd /exitonerror' , @ScriptDir & '\cmd\' , @SW_SHOWMINNOACTIVE )
  410.     Else
  411.         $result = RunWait( @ComSpec & ' /D /C CheckOUVersion.cmd /exitonerror /proxy ' & $strproxy , @ScriptDir & '\cmd\' , @SW_SHOWMINNOACTIVE )
  412.     EndIf
  413.     If $result = 0 Then $result = @error
  414.     If $result <> 0 Then
  415.         If ShowGUIInGerman() Then
  416.             $sMsgBoxTitle = 'Versionsprüfung'
  417.             $sMsgBoxText  = 'Sie setzen ' & $caption & ' ein. Eine neuere Version ist verfügbar.' & @LF & _
  418.                                  'Möchten Sie WSUS Offline Update nun aktualisieren?'
  419.         Else
  420.             $sMsgBoxTitle = 'Version check'
  421.             $sMsgBoxText  = 'You are using ' & $caption & '. A newer version is available.' & @LF & _
  422.                                  'Would you like to update WSUS Offline Update now?'
  423.         EndIf
  424.         $result = MsgBox( 0x2023 , $sMsgBoxTitle , $sMsgBoxText )
  425.         Switch $result
  426.             Case $msgbox_btn_yes
  427.                 $result = -1
  428.             Case $msgbox_btn_no
  429.                 $result = 0
  430.             Case Else
  431.                 $result = 1
  432.         EndSwitch
  433.     EndIf
  434.     EnableGUI()
  435.     Return $result
  436. EndFunc
  437.  
  438. Func RunSelfUpdate( $strproxy )
  439.     If $strproxy = '' Then
  440.         Run( @ComSpec & ' /D /C UpdateOU.cmd /restartgenerator' , @ScriptDir & '\cmd\' , @SW_SHOW )
  441.     Else
  442.         Run( @ComSpec & ' /D /C UpdateOU.cmd /restartgenerator /proxy ' & $strproxy , @ScriptDir & '\cmd\' , @SW_SHOW )
  443.     EndIf
  444.     Return 0
  445. EndFunc
  446.  
  447. Func RunDownloadScript( $stroptions , $strswitches )
  448.     Local $result
  449.  
  450.     If IsCheckBoxChecked( $scripting ) Then
  451.         If $runany Then
  452.             $result = FileOpen( @ScriptDir & '\cmd\custom\' & $runAllFile , 1 )
  453.         Else
  454.             $result = FileOpen( @ScriptDir & '\cmd\custom\' & $runAllFile , 2 )
  455.         EndIf
  456.         If $result = -1 Then
  457.             If ShowGUIInGerman() Then
  458.                 $sMsgBoxTitle = 'Fehler'
  459.                 $sMsgBoxText  = 'Fehler beim Öffnen der Datei "'
  460.             Else
  461.                 $sMsgBoxTitle = 'Error'
  462.                 $sMsgBoxText  = 'Error opening file "'
  463.             EndIf
  464.             MsgBox( 0x2010 , $sMsgBoxTitle , $sMsgBoxText & @ScriptDir & '\cmd\custom\' & $runAllFile & '".' )
  465.             Return $result
  466.         EndIf
  467.         FileWrite( $result , '@pushd ..' & @CRLF & 'call .\DownloadUpdates.cmd ' & $stroptions & $strswitches & @CRLF & '@popd' )
  468.         FileClose( $result )
  469.         $runany = True
  470.         Return 0
  471.     EndIf
  472.  
  473.     WinSetTitle( $maindlg , $maindlg , $caption & ( ShowGUIInGerman() ? ' - Lade Updates für ' : ' - Downloading updates for ' ) & $stroptions & '...' )
  474.     DisableGUI()
  475.     If IniRead( $inifilename , $ini_section_misc , $misc_token_minimize , $disabled ) = $enabled Then
  476.       $result = RunWait( @ComSpec & ' /D /C DownloadUpdates.cmd ' & $stroptions & $strswitches , @ScriptDir & '\cmd\' , @SW_SHOWMINNOACTIVE )
  477.     Else
  478.       $result = RunWait( @ComSpec & ' /D /C DownloadUpdates.cmd ' & $stroptions & $strswitches , @ScriptDir & '\cmd\' , @SW_SHOW )
  479.     EndIf
  480.     If $result = 0 Then $result = @error
  481.     If $result = 0 Then
  482.         $runany = True
  483.         GUICtrlSetData( $buildlbl , ( ShowGUIInGerman() ? 'Letzter Download: ' : 'Last download: ' ) & LastDownloadRun())
  484.     Else
  485.         WinSetState( $maindlg , $maindlg , @SW_RESTORE )
  486.         If ShowGUIInGerman() Then
  487.             $sMsgBoxTitle = 'Fehler'
  488.             $sMsgBoxText  = 'Fehler beim Herunterladen / Verifizieren der Updates für ' & $stroptions & '.' & @LF & _
  489.                                  'Möchten Sie nun die Protokolldatei ansehen?'
  490.         Else
  491.             $sMsgBoxTitle = 'Error'
  492.             $sMsgBoxText  = 'Error downloading / verifying updates for ' & $stroptions & '.' & @LF & _
  493.                                  'Would you like to view the log file now?'
  494.         EndIf
  495.         If MsgBox( 0x2014 , $sMsgBoxTitle , $sMsgBoxText ) = $msgbox_btn_yes Then ShowLogFile()
  496.     EndIf
  497.     WinSetTitle( $maindlg , $maindlg , $title )
  498.     EnableGUI()
  499.     Return $result
  500. EndFunc
  501.  
  502. Func RunISOCreationScript( $stroptions , $strswitches )
  503.     Local $result
  504.  
  505.     If IsCheckBoxChecked( $scripting ) Then
  506.         If $runany Then
  507.             $result = FileOpen( @ScriptDir & '\cmd\custom\' & $runAllFile , 1 )
  508.         Else
  509.             $result = FileOpen( @ScriptDir & '\cmd\custom\' & $runAllFile , 2 )
  510.         EndIf
  511.         If $result = -1 Then
  512.             If ShowGUIInGerman() Then
  513.                 $sMsgBoxTitle = 'Fehler'
  514.                 $sMsgBoxText  = 'Fehler beim Öffnen der Datei "'
  515.             Else
  516.                 $sMsgBoxTitle = 'Error'
  517.                 $sMsgBoxText  = 'Error opening file "'
  518.             EndIf
  519.             MsgBox( 0x2010 , $sMsgBoxTitle , $sMsgBoxText & @ScriptDir & '\cmd\custom\' & $runAllFile & '".' )
  520.             Return $result
  521.         EndIf
  522.         FileWrite( $result , '@pushd ..' & @CRLF & 'call .\CreateISOImage.cmd ' & $stroptions & $strswitches & @CRLF & '@popd' )
  523.         FileClose( $result )
  524.         $runany = True
  525.         Return 0
  526.     EndIf
  527.  
  528.     WinSetTitle( $maindlg , $maindlg , $caption & ( ShowGUIInGerman() ? ' - Erstelle ISO-Image für ' : ' - Creating ISO image for ' ) & $stroptions & '...' )
  529.     DisableGUI()
  530.     If IniRead( $inifilename , $ini_section_misc , $misc_token_minimize , $disabled ) = $enabled Then
  531.         $result = RunWait( @ComSpec & ' /D /C CreateISOImage.cmd ' & $stroptions & $strswitches , @ScriptDir & '\cmd\' , @SW_SHOWMINNOACTIVE )
  532.     Else
  533.         $result = RunWait( @ComSpec & ' /D /C CreateISOImage.cmd ' & $stroptions & $strswitches , @ScriptDir & '\cmd\' , @SW_SHOW )
  534.     EndIf
  535.     If $result = 0 Then $result = @error
  536.     If $result = 0 Then
  537.         $runany = True
  538.     Else
  539.         WinSetState( $maindlg , $maindlg , @SW_RESTORE )
  540.         If ShowGUIInGerman() Then
  541.             $sMsgBoxTitle = 'Fehler'
  542.             $sMsgBoxText  = 'Fehler beim Erstellen des ISO-Images für ' & $stroptions & '.'
  543.         Else
  544.             $sMsgBoxTitle = 'Error'
  545.             $sMsgBoxText  = 'Error creating ISO image for ' & $stroptions & '.'
  546.         EndIf
  547.         MsgBox( 0x2014 , $sMsgBoxTitle , $sMsgBoxText )
  548.     EndIf
  549.     WinSetTitle( $maindlg , $maindlg , $title )
  550.     EnableGUI()
  551.     Return $result
  552. EndFunc
  553.  
  554. Func RunUSBCreationScript( $stroptions , $strswitches , $strpath )
  555.     Local $result
  556.  
  557.     If IsCheckBoxChecked( $scripting ) Then
  558.         If $runany Then
  559.             $result = FileOpen( @ScriptDir & '\cmd\custom\' & $runAllFile , 1 )
  560.         Else
  561.             $result = FileOpen( @ScriptDir & '\cmd\custom\' & $runAllFile , 2 )
  562.         EndIf
  563.         If $result = -1 Then
  564.             If ShowGUIInGerman() Then
  565.                 $sMsgBoxTitle = 'Fehler'
  566.                 $sMsgBoxText  = 'Fehler beim Öffnen der Datei "'
  567.             Else
  568.                 $sMsgBoxTitle = 'Error'
  569.                 $sMsgBoxText  = 'Error opening file "'
  570.             EndIf
  571.             MsgBox( 0x2010 , $sMsgBoxTitle , $sMsgBoxText & @ScriptDir & '\cmd\custom\' & $runAllFile & '".' )
  572.             Return $result
  573.         EndIf
  574.         FileWrite( $result , '@pushd ..' & @CRLF & 'call .\CopyToTarget.cmd ' & $stroptions & ' "' & $strpath & '"' & $strswitches & @CRLF & '@popd' )
  575.         FileClose( $result )
  576.         $runany = True
  577.         Return 0
  578.     EndIf
  579.  
  580.     $result = 0
  581.     If NOT FileExists( $strpath ) Then
  582.         If ShowGUIInGerman() Then
  583.             $sMsgBoxTitle = 'Warnung'
  584.             $sMsgBoxText  = 'Das Zielverzeichnis "' & $strpath & '" existiert nicht.'
  585.         Else
  586.             $sMsgBoxTitle = 'Warning'
  587.             $sMsgBoxText  = 'The target directory "' & $strpath & '" does not exist.'
  588.         EndIf
  589.         MsgBox( 0x2010 , $sMsgBoxTitle , $sMsgBoxText )
  590.         Return $result
  591.     EndIf
  592.     WinSetTitle( $maindlg , $maindlg , $caption & ( ShowGUIInGerman() ? ' - Kopiere Dateien für ' : ' - Copying files for ' ) & $stroptions & '...' )
  593.     DisableGUI()
  594.     If IniRead( $inifilename , $ini_section_misc , $misc_token_minimize , $disabled ) = $enabled Then
  595.         $result = RunWait( @ComSpec & ' /D /C CopyToTarget.cmd ' & $stroptions & ' "' & $strpath & '"' & $strswitches , @ScriptDir & '\cmd\' , @SW_SHOWMINNOACTIVE )
  596.     Else
  597.         $result = RunWait( @ComSpec & ' /D /C CopyToTarget.cmd ' & $stroptions & ' "' & $strpath & '"' & $strswitches , @ScriptDir & '\cmd\' , @SW_SHOW )
  598.     EndIf
  599.     If $result = 0 Then $result = @error
  600.     If $result = 0 Then
  601.         $runany = True
  602.     Else
  603.         WinSetState( $maindlg , $maindlg , @SW_RESTORE )
  604.         If ShowGUIInGerman() Then
  605.             $sMsgBoxTitle = 'Fehler'
  606.             $sMsgBoxText  = 'Fehler beim Kopieren der Dateien für ' & $stroptions & '.'
  607.         Else
  608.             $sMsgBoxTitle = 'Error'
  609.             $sMsgBoxText  = 'Error copying files for ' & $stroptions & '.'
  610.         EndIf
  611.         MsgBox( 0x2010 , $sMsgBoxTitle , $sMsgBoxText )
  612.     EndIf
  613.     WinSetTitle( $maindlg , $maindlg , $title )
  614.     EnableGUI()
  615.     Return $result
  616. EndFunc
  617.  
  618. Func RunScripts( $stroptions , $skipdl , $strdownloadswitches , $runiso , $strisoswitches , $runusb , $strusbpath )
  619.     Local $result
  620.  
  621.     If $skipdl Then
  622.         $result = 0
  623.     Else
  624.         $result = RunDownloadScript( $stroptions , $strdownloadswitches )
  625.     EndIf
  626.     If $result = 0 AND $runiso Then
  627.         $result = RunISOCreationScript( $stroptions , $strisoswitches )
  628.     EndIf
  629.     If $result = 0 AND $runusb AND FileExists( $strusbpath ) Then
  630.         $result = RunUSBCreationScript( $stroptions , $strisoswitches , $strusbpath )
  631.     EndIf
  632.     Return $result
  633. EndFunc
  634.  
  635. Func SaveSettings()
  636.     ; Windows
  637.     _SaveSettingsWindowsAndOffice( 1 )
  638.  
  639.     ; Office
  640.     _SaveSettingsWindowsAndOffice( 2 )
  641.  
  642.     ; Image creation
  643.     IniWrite( $inifilename , $ini_section_iso , $iso_token_cd      , CheckBoxStateToString( $cdiso   ))
  644.     IniWrite( $inifilename , $ini_section_iso , $iso_token_dvd     , CheckBoxStateToString( $dvdiso  ))
  645.     IniWrite( $inifilename , $ini_section_usb , $usb_token_copy    , CheckBoxStateToString( $usbcopy ))
  646.     IniWrite( $inifilename , $ini_section_usb , $usb_token_path    , GUICtrlRead( $usbpath ))
  647.     IniWrite( $inifilename , $ini_section_usb , $usb_token_cleanup , CheckBoxStateToString( $usbclean ))
  648.  
  649.     ; Miscellaneous
  650.     IniWrite( $inifilename , $ini_section_opts , $opts_token_verify        , CheckBoxStateToString( $verifydownloads ))
  651.     IniWrite( $inifilename , $ini_section_opts , $opts_token_includesp     , CheckBoxStateToString( $includesp ))
  652.     IniWrite( $inifilename , $ini_section_opts , $opts_token_includedotnet , CheckBoxStateToString( $dotnet ))
  653.     IniWrite( $inifilename , $ini_section_opts , $opts_token_wle           , CheckBoxStateToString( $wle    ))
  654.     IniWrite( $inifilename , $ini_section_opts , $opts_token_msse          , CheckBoxStateToString( $msse   ))
  655.     IniWrite( $inifilename , $ini_section_opts , $opts_token_wddefs        , CheckBoxStateToString( $wddefs ))
  656.     IniWrite( $inifilename , $ini_section_misc , $misc_token_proxy         , $proxy )
  657.     IniWrite( $inifilename , $ini_section_misc , $misc_token_wsus          , $wsus  )
  658.  
  659.     Return 0
  660. EndFunc
  661.  
  662. Func _SaveSettingsWindowsAndOffice( $iValue )
  663.     Local $aSavSetSplit
  664.  
  665.     For $ii = 1 To $aMainArray[0][0]
  666.         If $aMainArray[$ii][$iValue] <> '' Then
  667.             $aSavSetSplit = StringSplit( $aMainArray[$ii][$iValue] , '|' )
  668.             For $jj = 1 To $aSavSetSplit[0]
  669.                 $sCurrentSec = StringReplace( 'ini section '     & $aSavSetSplit[$jj]        , ' ' , '_' )
  670.                 $sCurrentKey = StringReplace( 'lang token '      & $aMainArray[$ii][0]       , ' ' , '_' )
  671.                 $sCurrentVal = StringReplace( $aSavSetSplit[$jj] & ' ' & $aMainArray[$ii][0] , ' ' , '_' )
  672.                 IniWrite(  $inifilename _
  673.                             , Eval( $sCurrentSec ) _
  674.                             , Eval( $sCurrentKey ) _
  675.                             , CheckBoxStateToString( Eval( $sCurrentVal )))
  676.             Next
  677.         EndIf
  678.     Next
  679. EndFunc
  680.  
  681. Func CalcGUISize()
  682.     Local $reg_val
  683.  
  684.     If StringInStr( 'WIN_VISTA|WIN_2008|WIN_7|WIN_2008R2|WIN_8|WIN_2012|WIN_81|WIN_2012R2' , @OSVersion ) > 0 Then
  685.         DllCall( 'user32.dll' , 'int' , 'SetProcessDPIAware' )
  686.     EndIf
  687.     $reg_val = RegRead( $reg_key_hkcu_winmetrics , $reg_val_applieddpi )
  688.     If $reg_val = '' Then
  689.         $reg_val = RegRead( $reg_key_hkcu_desktop , $reg_val_logpixels )
  690.     EndIf
  691.     If $reg_val = '' Then $reg_val = $default_logpixels
  692.     $dlgheight  = 520 * $reg_val / $default_logpixels
  693.     If ShowGUIInGerman() Then
  694.         $txtwidth = 90 * $reg_val / $default_logpixels
  695.     Else
  696.         $txtwidth = 80 * $reg_val / $default_logpixels
  697.     EndIf
  698.     $txtheight   = 20 * $reg_val / $default_logpixels
  699.     $slimheight  = 15 * $reg_val / $default_logpixels
  700.     $btnwidth    = 80 * $reg_val / $default_logpixels
  701.     $btnheight   = 30 * $reg_val / $default_logpixels
  702.     $txtxoffset  = 10 * $reg_val / $default_logpixels
  703.     $txtyoffset  = 10 * $reg_val / $default_logpixels
  704.     Return 0
  705. EndFunc
  706.  
  707. ; Main Dialog
  708. CalcGUISize()
  709. $groupwidth = 8 * $txtwidth + 2 * $txtxoffset
  710. $groupheight_lng = 4 * $txtheight
  711. $groupheight_glb = 2 * $txtheight
  712. $maindlg = GUICreate( $title , $groupwidth + 4 * $txtxoffset , $dlgheight )
  713. GUISetFont( 8.5 , 400 , 0 , 'Sans Serif' )
  714. If $CmdLine[0] > 0 AND StringRight( $CmdLine[$CmdLine[0]] , 4 ) = '.ini' Then
  715.     $inifilename = $CmdLine[$CmdLine[0]]
  716. Else
  717.     $inifilename = StringLeft( @ScriptFullPath , StringInStr( @ScriptFullPath , '.' , 0 , -1 )) & 'ini'
  718. EndIf
  719.  
  720. ; Label
  721. $txtxpos = $txtxoffset
  722. $txtypos = $txtyoffset
  723. GUICtrlCreateLabel( ShowGUIInGerman() ? 'Lade Microsoft-Updates für...' : 'Download Microsoft updates for...' , _
  724.                 $txtxpos , $txtypos , 3 * $groupwidth / 4 , $txtheight )
  725.  
  726. ; Medium info group
  727. $txtxpos = $txtxoffset + 3 * $groupwidth / 4
  728. $txtypos = 0
  729. GUICtrlCreateGroup( ShowGUIInGerman() ? 'Repository-Info' : 'Repository info' , _
  730.                 $txtxpos , $txtypos , $groupwidth / 4 + 2 * $txtxoffset , 2 * $txtheight )
  731. $txtxpos  = $txtxpos + $txtxoffset
  732. $txtypos  = $txtypos + 1.5 * $txtyoffset + 2
  733. $buildlbl = GUICtrlCreateLabel(( ShowGUIInGerman() ? 'Letzter Download: ' : 'Last download: ' ) & LastDownloadRun() , _
  734.                 $txtxpos , $txtypos , $groupwidth / 4 , $txtheight )
  735.  
  736. ; Tab control
  737. $txtxpos = $txtxoffset
  738. $txtypos = $txtyoffset + $txtheight
  739. GuiCtrlCreateTab( $txtxpos , $txtypos , $groupwidth + 2 * $txtxoffset , $groupheight_lng + 4 * $groupheight_glb + 3.5 * $txtyoffset )
  740.  
  741. ; Operating Systems' Tab
  742. $tabitemfocused = GuiCtrlCreateTabItem( 'Windows' )
  743.  
  744. ; Windows Vista / Server 2008 group
  745. $txtxpos = 2 * $txtxoffset
  746. $txtypos = 3.5 * $txtyoffset + $txtheight
  747. GUICtrlCreateGroup( 'Windows Vista / Server 2008 (w60 / w60-x64)' , $txtxpos , $txtypos , $groupwidth , $groupheight_glb )
  748.  
  749. ; Windows Vista / Server 2008 global
  750. $txtypos = $txtypos + 1.5 * $txtyoffset
  751. $txtxpos = 3 * $txtxoffset
  752. $w60_glb = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $groupwidth / 2 - $txtxoffset , $txtheight )
  753.  
  754. ; Windows Vista / Server 2008 x64 global
  755. $txtxpos     = $txtxpos + $groupwidth / 2 - $txtxoffset
  756. $w60_x64_glb = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $groupwidth / 2 - $txtxoffset , $txtheight )
  757.  
  758. ; Windows 7 / Server 2008 R2 group
  759. $txtxpos = 2 * $txtxoffset
  760. $txtypos = $txtypos + 2.5 * $txtyoffset
  761. GUICtrlCreateGroup( 'Windows 7 / Server 2008 R2 (w61 / w61-x64)' , $txtxpos , $txtypos , $groupwidth , $groupheight_glb )
  762.  
  763. ; Windows 7 global
  764. $txtypos = $txtypos + 1.5 * $txtyoffset
  765. $txtxpos = 3 * $txtxoffset
  766. $w61_glb = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $groupwidth / 2 - $txtxoffset , $txtheight )
  767.  
  768. ; Windows 7 / Server 2008 R2 x64 global
  769. $txtxpos     = $txtxpos + $groupwidth / 2 - $txtxoffset
  770. $w61_x64_glb = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $groupwidth / 2 - $txtxoffset , $txtheight )
  771.  
  772. ; Windows 8 / Server 2012 group
  773. $txtxpos = 2 * $txtxoffset
  774. $txtypos = $txtypos + 2.5 * $txtyoffset
  775. GUICtrlCreateGroup( 'Windows 8 / Server 2012 (w62 / w62-x64)' , $txtxpos , $txtypos , $groupwidth , $groupheight_glb )
  776.  
  777. ; Windows 8 global
  778. $txtypos = $txtypos + 1.5 * $txtyoffset
  779. $txtxpos = 3 * $txtxoffset
  780. $w62_glb = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $groupwidth / 2 - $txtxoffset , $txtheight )
  781.  
  782. ; Windows 8 / Server 2012 x64 global
  783. $txtxpos     = $txtxpos + $groupwidth / 2 - $txtxoffset
  784. $w62_x64_glb = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $groupwidth / 2 - $txtxoffset , $txtheight )
  785.  
  786. ; Windows 8.1 / Server 2012 R2 group
  787. $txtxpos = 2 * $txtxoffset
  788. $txtypos = $txtypos + 2.5 * $txtyoffset
  789. GUICtrlCreateGroup( 'Windows 8.1 / Server 2012 R2 (w63 / w63-x64)' , $txtxpos , $txtypos , $groupwidth , $groupheight_glb )
  790.  
  791. ; Windows 8.1 global
  792. $txtypos = $txtypos + 1.5 * $txtyoffset
  793. $txtxpos = 3 * $txtxoffset
  794. $w63_glb = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $groupwidth / 2 - $txtxoffset , $txtheight )
  795.  
  796. ; Windows 8.1 / Server 2012 R2 x64 global
  797. $txtxpos = $txtxpos + $groupwidth / 2 - $txtxoffset
  798. $w63_x64_glb = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $groupwidth / 2 - $txtxoffset , $txtheight )
  799.  
  800. ; Office Suites' Tab
  801. GuiCtrlCreateTabItem( 'Office' )
  802.  
  803. ; Office 2007 group
  804. $txtxpos = 2 * $txtxoffset
  805. $txtypos = 3.5 * $txtyoffset + $txtheight
  806. GUICtrlCreateGroup( 'Office 2007 (o2k7)' , $txtxpos , $txtypos , $groupwidth , $groupheight_lng )
  807.  
  808. ; Office 2007 English
  809. $txtypos = $txtypos + 1.5 * $txtyoffset
  810. $txtxpos = 3 * $txtxoffset
  811. $o2k7_enu = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth - 5 , $txtheight )
  812.  
  813. ; Office 2007 French
  814. $txtxpos = $txtxpos + $txtwidth - 5
  815. $o2k7_fra = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth + 10 , $txtheight )
  816.  
  817. ; Office 2007 Spanish
  818. $txtxpos = $txtxpos + $txtwidth + 10
  819. $o2k7_esn = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth - 5 , $txtheight )
  820.  
  821. ; Office 2007 Japanese
  822. $txtxpos = $txtxpos + $txtwidth - 5
  823. $o2k7_jpn = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth , $txtheight )
  824.  
  825. ; Office 2007 Korean
  826. $txtxpos = $txtxpos + $txtwidth
  827. $o2k7_kor = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth + 5 , $txtheight )
  828.  
  829. ; Office 2007 Russian
  830. $txtxpos = $txtxpos + $txtwidth + 5
  831. $o2k7_rus = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth - 10 , $txtheight )
  832.  
  833. ; Office 2007 Portuguese
  834. $txtxpos = $txtxpos + $txtwidth - 10
  835. $o2k7_ptg = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth + 5 , $txtheight )
  836.  
  837. ; Office 2007 Brazilian
  838. $txtxpos = $txtxpos + $txtwidth + 5
  839. $o2k7_ptb = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth , $txtheight )
  840.  
  841. ; Office 2007 German
  842. $txtxpos = 3 * $txtxoffset
  843. $txtypos = $txtypos + $txtheight
  844. $o2k7_deu = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth - 5 , $txtheight )
  845.  
  846. ; Office 2007 Dutch
  847. $txtxpos = $txtxpos + $txtwidth - 5
  848. $o2k7_nld = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth + 10 , $txtheight )
  849.  
  850. ; Office 2007 Italian
  851. $txtxpos = $txtxpos + $txtwidth + 10
  852. $o2k7_ita = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth - 5 , $txtheight )
  853.  
  854. ; Office 2007 Chinese simplified
  855. $txtxpos = $txtxpos + $txtwidth - 5
  856. $o2k7_chs = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth , $txtheight )
  857.  
  858. ; Office 2007 Chinese traditional
  859. $txtxpos = $txtxpos + $txtwidth
  860. $o2k7_cht = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth + 5 , $txtheight )
  861.  
  862. ; Office 2007 Polish
  863. $txtxpos = $txtxpos + $txtwidth + 5
  864. $o2k7_plk = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth - 10 , $txtheight )
  865.  
  866. ; Office 2007 Hungarian
  867. $txtxpos = $txtxpos + $txtwidth - 10
  868. $o2k7_hun = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth + 5 , $txtheight )
  869.  
  870. ; Office 2007 Czech
  871. $txtxpos = $txtxpos + $txtwidth + 5
  872. $o2k7_csy = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth , $txtheight )
  873.  
  874. ; Office 2007 Swedish
  875. $txtxpos = 3 * $txtxoffset
  876. $txtypos = $txtypos + $txtheight
  877. $o2k7_sve = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth - 5 , $txtheight )
  878.  
  879. ; Office 2007 Turkish
  880. $txtxpos = $txtxpos + $txtwidth - 5
  881. $o2k7_trk = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth + 10 , $txtheight )
  882.  
  883. ; Office 2007 Greek
  884. $txtxpos = $txtxpos + $txtwidth + 10
  885. $o2k7_ell = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth - 5 , $txtheight )
  886.  
  887. ; Office 2007 Arabic
  888. $txtxpos = $txtxpos + $txtwidth - 5
  889. $o2k7_ara = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth , $txtheight )
  890.  
  891. ; Office 2007 Hebrew
  892. $txtxpos = $txtxpos + $txtwidth
  893. $o2k7_heb = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth + 5 , $txtheight )
  894.  
  895. ; Office 2007 Danish
  896. $txtxpos = $txtxpos + $txtwidth + 5
  897. $o2k7_dan = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth - 10 , $txtheight )
  898.  
  899. ; Office 2007 Norwegian
  900. $txtxpos = $txtxpos + $txtwidth - 10
  901. $o2k7_nor = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth + 5 , $txtheight )
  902.  
  903. ; Office 2007 Finnish
  904. $txtxpos = $txtxpos + $txtwidth + 5
  905. $o2k7_fin = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth , $txtheight )
  906.  
  907. ; Office 2010 group
  908. $txtxpos = 2 * $txtxoffset
  909. $txtypos = $txtypos + 2.5 * $txtyoffset
  910. GUICtrlCreateGroup( 'Office 2010 (o2k10)' , $txtxpos , $txtypos , $groupwidth , $groupheight_lng )
  911.  
  912. ; Office 2010 English
  913. $txtypos = $txtypos + 1.5 * $txtyoffset
  914. $txtxpos = 3 * $txtxoffset
  915. $o2k10_enu = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth - 5 , $txtheight )
  916.  
  917. ; Office 2010 French
  918. $txtxpos = $txtxpos + $txtwidth - 5
  919. $o2k10_fra = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth + 10 , $txtheight )
  920.  
  921. ; Office 2010 Spanish
  922. $txtxpos = $txtxpos + $txtwidth + 10
  923. $o2k10_esn = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth - 5 , $txtheight )
  924.  
  925. ; Office 2010 Japanese
  926. $txtxpos = $txtxpos + $txtwidth - 5
  927. $o2k10_jpn = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth , $txtheight )
  928.  
  929. ; Office 2010 Korean
  930. $txtxpos = $txtxpos + $txtwidth
  931. $o2k10_kor = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth + 5 , $txtheight )
  932.  
  933. ; Office 2010 Russian
  934. $txtxpos = $txtxpos + $txtwidth + 5
  935. $o2k10_rus = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth - 10 , $txtheight )
  936.  
  937. ; Office 2010 Portuguese
  938. $txtxpos = $txtxpos + $txtwidth - 10
  939. $o2k10_ptg = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth + 5 , $txtheight )
  940.  
  941. ; Office 2010 Brazilian
  942. $txtxpos = $txtxpos + $txtwidth + 5
  943. $o2k10_ptb = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth , $txtheight )
  944.  
  945. ; Office 2010 German
  946. $txtxpos = 3 * $txtxoffset
  947. $txtypos = $txtypos + $txtheight
  948. $o2k10_deu = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth - 5 , $txtheight )
  949.  
  950. ; Office 2010 Dutch
  951. $txtxpos = $txtxpos + $txtwidth - 5
  952. $o2k10_nld = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth + 10 , $txtheight )
  953.  
  954. ; Office 2010 Italian
  955. $txtxpos = $txtxpos + $txtwidth + 10
  956. $o2k10_ita = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth - 5 , $txtheight )
  957.  
  958. ; Office 2010 Chinese simplified
  959. $txtxpos = $txtxpos + $txtwidth - 5
  960. $o2k10_chs = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth , $txtheight )
  961.  
  962. ; Office 2010 Chinese traditional
  963. $txtxpos = $txtxpos + $txtwidth
  964. $o2k10_cht = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth + 5 , $txtheight )
  965.  
  966. ; Office 2010 Polish
  967. $txtxpos = $txtxpos + $txtwidth + 5
  968. $o2k10_plk = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth - 10 , $txtheight )
  969.  
  970. ; Office 2010 Hungarian
  971. $txtxpos = $txtxpos + $txtwidth - 10
  972. $o2k10_hun = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth + 5 , $txtheight )
  973.  
  974. ; Office 2010 Czech
  975. $txtxpos = $txtxpos + $txtwidth + 5
  976. $o2k10_csy = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth , $txtheight )
  977.  
  978. ; Office 2010 Swedish
  979. $txtxpos = 3 * $txtxoffset
  980. $txtypos = $txtypos + $txtheight
  981. $o2k10_sve = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth - 5 , $txtheight )
  982.  
  983. ; Office 2010 Turkish
  984. $txtxpos = $txtxpos + $txtwidth - 5
  985. $o2k10_trk = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth + 10 , $txtheight )
  986.  
  987. ; Office 2010 Greek
  988. $txtxpos = $txtxpos + $txtwidth + 10
  989. $o2k10_ell = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth - 5 , $txtheight )
  990.  
  991. ; Office 2010 Arabic
  992. $txtxpos = $txtxpos + $txtwidth - 5
  993. $o2k10_ara = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth , $txtheight )
  994.  
  995. ; Office 2010 Hebrew
  996. $txtxpos = $txtxpos + $txtwidth
  997. $o2k10_heb = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth + 5 , $txtheight )
  998.  
  999. ; Office 2010 Danish
  1000. $txtxpos = $txtxpos + $txtwidth + 5
  1001. $o2k10_dan = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth - 10 , $txtheight )
  1002.  
  1003. ; Office 2010 Norwegian
  1004. $txtxpos = $txtxpos + $txtwidth - 10
  1005. $o2k10_nor = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth + 5 , $txtheight )
  1006.  
  1007. ; Office 2010 Finnish
  1008. $txtxpos = $txtxpos + $txtwidth + 5
  1009. $o2k10_fin = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth , $txtheight )
  1010.  
  1011. ; Office 2013 group
  1012. $txtxpos = 2 * $txtxoffset
  1013. $txtypos = $txtypos + 2.5 * $txtyoffset
  1014. GUICtrlCreateGroup( 'Office 2013 (o2k13)' , $txtxpos , $txtypos , $groupwidth , $groupheight_lng )
  1015.  
  1016. ; Office 2013 English
  1017. $txtypos = $txtypos + 1.5 * $txtyoffset
  1018. $txtxpos = 3 * $txtxoffset
  1019. $o2k13_enu = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth - 5 , $txtheight )
  1020.  
  1021. ; Office 2013 French
  1022. $txtxpos = $txtxpos + $txtwidth - 5
  1023. $o2k13_fra = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth + 10 , $txtheight )
  1024.  
  1025. ; Office 2013 Spanish
  1026. $txtxpos = $txtxpos + $txtwidth + 10
  1027. $o2k13_esn = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth - 5 , $txtheight )
  1028.  
  1029. ; Office 2013 Japanese
  1030. $txtxpos = $txtxpos + $txtwidth - 5
  1031. $o2k13_jpn = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth , $txtheight )
  1032.  
  1033. ; Office 2013 Korean
  1034. $txtxpos = $txtxpos + $txtwidth
  1035. $o2k13_kor = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth + 5 , $txtheight )
  1036.  
  1037. ; Office 2013 Russian
  1038. $txtxpos = $txtxpos + $txtwidth + 5
  1039. $o2k13_rus = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth - 10 , $txtheight )
  1040.  
  1041. ; Office 2013 Portuguese
  1042. $txtxpos = $txtxpos + $txtwidth - 10
  1043. $o2k13_ptg = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth + 5 , $txtheight )
  1044.  
  1045. ; Office 2013 Brazilian
  1046. $txtxpos = $txtxpos + $txtwidth + 5
  1047. $o2k13_ptb = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth , $txtheight )
  1048.  
  1049. ; Office 2013 German
  1050. $txtxpos = 3 * $txtxoffset
  1051. $txtypos = $txtypos + $txtheight
  1052. $o2k13_deu = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth - 5 , $txtheight )
  1053.  
  1054. ; Office 2013 Dutch
  1055. $txtxpos = $txtxpos + $txtwidth - 5
  1056. $o2k13_nld = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth + 10 , $txtheight )
  1057.  
  1058. ; Office 2013 Italian
  1059. $txtxpos = $txtxpos + $txtwidth + 10
  1060. $o2k13_ita = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth - 5 , $txtheight )
  1061.  
  1062. ; Office 2013 Chinese simplified
  1063. $txtxpos = $txtxpos + $txtwidth - 5
  1064. $o2k13_chs = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth , $txtheight )
  1065.  
  1066. ; Office 2013 Chinese traditional
  1067. $txtxpos = $txtxpos + $txtwidth
  1068. $o2k13_cht = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth + 5 , $txtheight )
  1069.  
  1070. ; Office 2013 Polish
  1071. $txtxpos = $txtxpos + $txtwidth + 5
  1072. $o2k13_plk = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth - 10 , $txtheight )
  1073.  
  1074. ; Office 2013 Hungarian
  1075. $txtxpos = $txtxpos + $txtwidth - 10
  1076. $o2k13_hun = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth + 5 , $txtheight )
  1077.  
  1078. ; Office 2013 Czech
  1079. $txtxpos = $txtxpos + $txtwidth + 5
  1080. $o2k13_csy = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth , $txtheight )
  1081.  
  1082. ; Office 2013 Swedish
  1083. $txtxpos = 3 * $txtxoffset
  1084. $txtypos = $txtypos + $txtheight
  1085. $o2k13_sve = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth - 5 , $txtheight )
  1086.  
  1087. ; Office 2013 Turkish
  1088. $txtxpos = $txtxpos + $txtwidth - 5
  1089. $o2k13_trk = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth + 10 , $txtheight )
  1090.  
  1091. ; Office 2013 Greek
  1092. $txtxpos = $txtxpos + $txtwidth + 10
  1093. $o2k13_ell = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth - 5 , $txtheight )
  1094.  
  1095. ; Office 2013 Arabic
  1096. $txtxpos = $txtxpos + $txtwidth - 5
  1097. $o2k13_ara = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth , $txtheight )
  1098.  
  1099. ; Office 2013 Hebrew
  1100. $txtxpos = $txtxpos + $txtwidth
  1101. $o2k13_heb = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth + 5 , $txtheight )
  1102.  
  1103. ; Office 2013 Danish
  1104. $txtxpos = $txtxpos + $txtwidth + 5
  1105. $o2k13_dan = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth - 10 , $txtheight )
  1106.  
  1107. ; Office 2013 Norwegian
  1108. $txtxpos = $txtxpos + $txtwidth - 10
  1109. $o2k13_nor = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth + 5 , $txtheight )
  1110.  
  1111. ; Office 2013 Finnish
  1112. $txtxpos = $txtxpos + $txtwidth + 5
  1113. $o2k13_fin = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth , $txtheight )
  1114.  
  1115. ; Legacy products' Tab
  1116. GuiCtrlCreateTabItem( ShowGUIInGerman() ? 'Altprodukte' : 'Legacy products' )
  1117.  
  1118. ; Windows Server 2003 group
  1119. $txtxpos = 2 * $txtxoffset
  1120. $txtypos = 3.5 * $txtyoffset + $txtheight
  1121. GUICtrlCreateGroup( 'Windows Server 2003 (w2k3)' , $txtxpos , $txtypos , $groupwidth , $groupheight_lng )
  1122.  
  1123. ; Windows Server 2003 English
  1124. $txtypos = $txtypos + 1.5 * $txtyoffset
  1125. $txtxpos = 3 * $txtxoffset
  1126. $w2k3_enu = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth - 5 , $txtheight )
  1127.  
  1128. ; Windows Server 2003 French
  1129. $txtxpos = $txtxpos + $txtwidth - 5
  1130. $w2k3_fra = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth + 10 , $txtheight )
  1131.  
  1132. ; Windows Server 2003 Spanish
  1133. $txtxpos = $txtxpos + $txtwidth + 10
  1134. $w2k3_esn = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth - 5 , $txtheight )
  1135.  
  1136. ; Windows Server 2003 Japanese
  1137. $txtxpos = $txtxpos + $txtwidth - 5
  1138. $w2k3_jpn = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth , $txtheight )
  1139.  
  1140. ; Windows Server 2003 Korean
  1141. $txtxpos = $txtxpos + $txtwidth
  1142. $w2k3_kor = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth + 5 , $txtheight )
  1143.  
  1144. ; Windows Server 2003 Russian
  1145. $txtxpos = $txtxpos + $txtwidth + 5
  1146. $w2k3_rus = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth - 10 , $txtheight )
  1147.  
  1148. ; Windows Server 2003 Portuguese
  1149. $txtxpos = $txtxpos + $txtwidth - 10
  1150. $w2k3_ptg = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth + 5 , $txtheight )
  1151.  
  1152. ; Windows Server 2003 Brazilian
  1153. $txtxpos = $txtxpos + $txtwidth + 5
  1154. $w2k3_ptb = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth , $txtheight )
  1155.  
  1156. ; Windows Server 2003 German
  1157. $txtxpos = 3 * $txtxoffset
  1158. $txtypos = $txtypos + $txtheight
  1159. $w2k3_deu = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth - 5 , $txtheight )
  1160.  
  1161. ; Windows Server 2003 Dutch
  1162. $txtxpos = $txtxpos + $txtwidth - 5
  1163. $w2k3_nld = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth + 10 , $txtheight )
  1164.  
  1165. ; Windows Server 2003 Italian
  1166. $txtxpos = $txtxpos + $txtwidth + 10
  1167. $w2k3_ita = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth - 5 , $txtheight )
  1168.  
  1169. ; Windows Server 2003 Chinese simplified
  1170. $txtxpos = $txtxpos + $txtwidth - 5
  1171. $w2k3_chs = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth , $txtheight )
  1172.  
  1173. ; Windows Server 2003 Chinese traditional
  1174. $txtxpos = $txtxpos + $txtwidth
  1175. $w2k3_cht = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth + 5 , $txtheight )
  1176.  
  1177. ; Windows Server 2003 Polish
  1178. $txtxpos = $txtxpos + $txtwidth + 5
  1179. $w2k3_plk = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth - 10 , $txtheight )
  1180.  
  1181. ; Windows Server 2003 Hungarian
  1182. $txtxpos = $txtxpos + $txtwidth - 10
  1183. $w2k3_hun = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth + 5 , $txtheight )
  1184.  
  1185. ; Windows Server 2003 Czech
  1186. $txtxpos = $txtxpos + $txtwidth + 5
  1187. $w2k3_csy = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth , $txtheight )
  1188.  
  1189. ; Windows Server 2003 Swedish
  1190. $txtxpos = 3 * $txtxoffset
  1191. $txtypos = $txtypos + $txtheight
  1192. $w2k3_sve = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth - 5 , $txtheight )
  1193.  
  1194. ; Windows Server 2003 Turkish
  1195. $txtxpos = $txtxpos + $txtwidth - 5
  1196. $w2k3_trk = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth + 10 , $txtheight )
  1197.  
  1198. ; Windows Server 2003 Greek
  1199. $txtxpos = $txtxpos + $txtwidth + 10
  1200. $w2k3_ell = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth - 5 , $txtheight )
  1201.  
  1202. ; Windows Server 2003 Arabic
  1203. $txtxpos = $txtxpos + $txtwidth - 5
  1204. $w2k3_ara = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth , $txtheight )
  1205.  
  1206. ; Windows Server 2003 Hebrew
  1207. $txtxpos = $txtxpos + $txtwidth
  1208. $w2k3_heb = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth + 5 , $txtheight )
  1209.  
  1210. ; Windows Server 2003 Danish
  1211. $txtxpos = $txtxpos + $txtwidth + 5
  1212. $w2k3_dan = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth - 10 , $txtheight )
  1213.  
  1214. ; Windows Server 2003 Norwegian
  1215. $txtxpos = $txtxpos + $txtwidth - 10
  1216. $w2k3_nor = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth + 5 , $txtheight )
  1217.  
  1218. ; Windows Server 2003 Finnish
  1219. $txtxpos = $txtxpos + $txtwidth + 5
  1220. $w2k3_fin = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth , $txtheight )
  1221.  
  1222. ; Windows Server 2003 x64 group
  1223. $txtxpos = 2 * $txtxoffset
  1224. $txtypos = $txtypos + 2.5 * $txtyoffset
  1225. GUICtrlCreateGroup( ShowGUIInGerman() ? 'Windows Server 2003 x64-Editionen (w2k3-x64)' : 'Windows Server 2003 x64 editions (w2k3-x64)' , _
  1226.                 $txtxpos , $txtypos , $groupwidth , $groupheight_glb )
  1227.  
  1228. ; Windows Server 2003 x64 English
  1229. $txtypos = $txtypos + 1.5 * $txtyoffset
  1230. $txtxpos = 3 * $txtxoffset
  1231. $w2k3_x64_enu = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth - 5 , $txtheight )
  1232.  
  1233. ; Windows Server 2003 x64 French
  1234. $txtxpos      = $txtxpos + $txtwidth - 5
  1235. $w2k3_x64_fra = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth + 10 , $txtheight )
  1236.  
  1237. ; Windows Server 2003 x64 Spanish
  1238. $txtxpos      = $txtxpos + $txtwidth + 10
  1239. $w2k3_x64_esn = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth - 5 , $txtheight )
  1240.  
  1241. ; Windows Server 2003 x64 Japanese
  1242. $txtxpos      = $txtxpos + $txtwidth - 5
  1243. $w2k3_x64_jpn = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth , $txtheight )
  1244.  
  1245. ; Windows Server 2003 x64 Korean
  1246. $txtxpos      = $txtxpos + $txtwidth
  1247. $w2k3_x64_kor = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth + 5 , $txtheight )
  1248.  
  1249. ; Windows Server 2003 x64 Russian
  1250. $txtxpos      = $txtxpos + $txtwidth + 5
  1251. $w2k3_x64_rus = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth - 10 , $txtheight )
  1252.  
  1253. ; Windows Server 2003 x64 Brazilian
  1254. $txtxpos      = $txtxpos + $txtwidth - 10
  1255. $w2k3_x64_ptb = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth + 5 , $txtheight )
  1256.  
  1257. ; Windows Server 2003 x64 German
  1258. $txtxpos      = $txtxpos + $txtwidth + 5
  1259. $w2k3_x64_deu = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth , $txtheight )
  1260.  
  1261. ; Product Lifecycle group
  1262. $txtxpos = 2 * $txtxoffset
  1263. $txtypos = $txtypos + 2.5 * $txtyoffset
  1264. GUICtrlCreateGroup( ShowGUIInGerman() ? 'Produkt-Lebenszyklus-Informationen' : 'Product lifecycle information' , _
  1265.                 $txtxpos , $txtypos , $groupwidth , $groupheight_glb )
  1266.  
  1267. ; Product Lifecycle label
  1268. $txtypos = $txtypos + 2 * $txtyoffset
  1269. $txtxpos = 3 * $txtxoffset
  1270. GUICtrlCreateLabel( ShowGUIInGerman() ? 'Diese Produkte wurden von Microsoft zum 14. Juli 2015 abgekündigt.' : 'Microsoft will discontinue support for these products on July 14th , 2015.' , _
  1271.                 $txtxpos , $txtypos , $groupwidth - 2 * $txtxoffset , $txtheight )
  1272.  
  1273. ; End Tab item definition
  1274. GuiCtrlCreateTabItem('')
  1275. GUICtrlSetState( $tabitemfocused , $GUI_SHOW )
  1276.  
  1277. ; Options group
  1278. $txtxpos = $txtxoffset
  1279. $txtypos = $groupheight_lng + 4 * $groupheight_glb + 7 * $txtyoffset
  1280. GUICtrlCreateGroup( ShowGUIInGerman() ? 'Optionen' : 'Options' , $txtxpos , $txtypos , $groupwidth + 2 * $txtxoffset , $groupheight_lng )
  1281.  
  1282. ; Verify downloads
  1283. $txtxpos = 2 * $txtxoffset
  1284. $txtypos = $txtypos + 1.5 * $txtyoffset
  1285. $verifydownloads = GUICtrlCreateCheckbox( ShowGUIInGerman() ? 'Heruntergeladene Updates verifizieren' : 'Verify downloaded updates' , _
  1286.                 $txtxpos , $txtypos , $groupwidth / 2 , $txtheight )
  1287. If IniRead( $inifilename , $ini_section_opts , $opts_token_verify , $enabled  ) = $enabled Then GUICtrlSetState( -1 , $GUI_CHECKED )
  1288. If IniRead( $inifilename , $ini_section_misc , $misc_token_skipdownload , $disabled ) = $enabled Then GUICtrlSetState( -1 , $GUI_DISABLE )
  1289.  
  1290. ; Include Service Packs
  1291. $txtxpos   = $txtxpos + $groupwidth / 2
  1292. $includesp = GUICtrlCreateCheckbox( ShowGUIInGerman() ? 'Service-Packs einschließen' : 'Include Service Packs' , _
  1293.                 $txtxpos , $txtypos , $groupwidth / 2 , $txtheight )
  1294. If IniRead( $inifilename , $ini_section_opts , $opts_token_allowsp , $enabled ) = $enabled Then
  1295.     If IniRead( $inifilename , $ini_section_opts , $opts_token_includesp , $enabled ) = $enabled Then
  1296.         GUICtrlSetState( -1 , $GUI_CHECKED )
  1297.     Else
  1298.         GUICtrlSetState( -1 , $GUI_UNCHECKED )
  1299.     EndIf
  1300. Else
  1301.     GUICtrlSetState( -1 , $GUI_UNCHECKED + $GUI_DISABLE )
  1302. EndIf
  1303. If IniRead( $inifilename , $ini_section_misc , $misc_token_skipdownload , $disabled ) = $enabled Then GUICtrlSetState( -1 , $GUI_DISABLE )
  1304.  
  1305. ; Include .NET Frameworks 3.5 SP1 and 4
  1306. $txtxpos = 2 * $txtxoffset
  1307. $txtypos = $txtypos + $txtheight
  1308. $dotnet  = GUICtrlCreateCheckbox( ShowGUIInGerman() ? 'C++-Laufzeitbibliotheken und .NET Frameworks einschließen' : 'Include C++ Runtime Libraries and .NET Frameworks' , _
  1309.                 $txtxpos , $txtypos , $groupwidth / 2 , $txtheight )
  1310. If IniRead( $inifilename , $ini_section_opts , $opts_token_allowdotnet , $enabled ) = $enabled Then
  1311.     If IniRead( $inifilename , $ini_section_opts , $opts_token_includedotnet , $disabled ) = $enabled Then
  1312.         GUICtrlSetState( -1 , $GUI_CHECKED )
  1313.     Else
  1314.         GUICtrlSetState( -1 , $GUI_UNCHECKED )
  1315.     EndIf
  1316. Else
  1317.     GUICtrlSetState( -1 , $GUI_UNCHECKED + $GUI_DISABLE )
  1318. EndIf
  1319.  
  1320. ; Include Windows Essentials 2012
  1321. $txtxpos = $txtxpos + $groupwidth / 2
  1322. $wle     = GUICtrlCreateCheckbox( ShowGUIInGerman() ? 'Windows Essentials 2012 einschließen' : 'Include Windows Essentials 2012' , _
  1323.                 $txtxpos , $txtypos , $groupwidth / 2 , $txtheight )
  1324. If IniRead( $inifilename , $ini_section_opts , $opts_token_wle , $disabled  ) = $enabled Then GUICtrlSetState( -1 , $GUI_CHECKED )
  1325. If IniRead( $inifilename , $ini_section_misc , $misc_token_skipdownload , $disabled ) = $enabled Then GUICtrlSetState( -1 , $GUI_DISABLE )
  1326.  
  1327. ; Include Microsoft Security Essentials
  1328. $txtxpos = 2 * $txtxoffset
  1329. $txtypos = $txtypos + $txtheight
  1330. $msse    = GUICtrlCreateCheckbox( ShowGUIInGerman() ? 'Microsoft Security Essentials einschließen' : 'Include Microsoft Security Essentials' , _
  1331.                 $txtxpos , $txtypos , $groupwidth / 2 , $txtheight )
  1332. If IniRead( $inifilename , $ini_section_opts , $opts_token_msse , $disabled  ) = $enabled Then GUICtrlSetState( -1 , $GUI_CHECKED )
  1333. If IniRead( $inifilename , $ini_section_misc , $misc_token_skipdownload , $disabled ) = $enabled Then GUICtrlSetState( -1 , $GUI_DISABLE )
  1334.  
  1335. ; Include Windows Defender definitions
  1336. $txtxpos = $txtxpos + $groupwidth / 2
  1337. $wddefs  = GUICtrlCreateCheckbox( ShowGUIInGerman() ? 'Windows Defender-Definitionen einschließen' : 'Include Windows Defender definitions' , _
  1338.                 $txtxpos , $txtypos , $groupwidth / 2 , $txtheight )
  1339. If IniRead( $inifilename , $ini_section_opts , $opts_token_wddefs , $disabled  ) = $enabled Then GUICtrlSetState( -1 , $GUI_CHECKED )
  1340. If IniRead( $inifilename , $ini_section_misc , $misc_token_skipdownload , $disabled ) = $enabled Then GUICtrlSetState( -1 , $GUI_DISABLE )
  1341.  
  1342. ; ISO-Image group
  1343. $txtxpos = $txtxoffset
  1344. $txtypos = $txtypos + 2.5 * $txtyoffset
  1345. GUICtrlCreateGroup( ShowGUIInGerman() ? 'Erstelle ISO-Image(s)...' : 'Create ISO image(s)...' , _
  1346.                 $txtxpos , $txtypos , $groupwidth + 2 * $txtxoffset ,  $groupheight_glb )
  1347.  
  1348. ; CD ISO image
  1349. $txtypos = $txtypos + 1.5 * $txtyoffset
  1350. $txtxpos = 2 * $txtxoffset
  1351. $cdiso   = GUICtrlCreateCheckbox( ShowGUIInGerman() ? 'pro Produkt und Sprache' : 'per selected product and language' , _
  1352.                 $txtxpos , $txtypos , $groupwidth / 2 , $txtheight )
  1353. If IniRead( $inifilename , $ini_section_misc , $misc_token_skipdownload , $disabled ) = $enabled Then
  1354.     GUICtrlSetState( -1 , $GUI_UNCHECKED + $GUI_DISABLE )
  1355. Else
  1356.     If IniRead( $inifilename , $ini_section_iso , $iso_token_cd , $disabled ) = $enabled Then
  1357.         GUICtrlSetState( -1 , $GUI_CHECKED )
  1358.     Else
  1359.         GUICtrlSetState( -1 , $GUI_UNCHECKED )
  1360.     EndIf
  1361. EndIf
  1362.  
  1363. ; Cross-Platform DVD ISO image
  1364. $txtxpos = $txtxpos + $groupwidth / 2
  1365. $dvdiso  = GUICtrlCreateCheckbox( ShowGUIInGerman() ? 'pro Sprache, x86-produktübergreifend (nur Desktop-Produkte)' : 'per selected language, x86-cross-product (desktop only)' , _
  1366.                 $txtxpos , $txtypos , $groupwidth / 2 , $txtheight )
  1367. If IniRead( $inifilename , $ini_section_misc , $misc_token_skipdownload , $disabled ) = $enabled Then
  1368.     GUICtrlSetState( -1 , $GUI_UNCHECKED + $GUI_DISABLE )
  1369. Else
  1370.     If IniRead( $inifilename , $ini_section_iso , $iso_token_dvd , $disabled ) = $enabled Then
  1371.         GUICtrlSetState( -1 , $GUI_CHECKED )
  1372.     Else
  1373.         GUICtrlSetState( -1 , $GUI_UNCHECKED )
  1374.     EndIf
  1375. EndIf
  1376.  
  1377. ; USB-Image group
  1378. $txtxpos = $txtxoffset
  1379. $txtypos = $txtypos + 2.5 * $txtyoffset
  1380. GUICtrlCreateGroup( ShowGUIInGerman() ? 'USB-Medium' : 'USB Medium' , $txtxpos , $txtypos , $groupwidth + 2 * $txtxoffset ,  $groupheight_glb )
  1381.  
  1382. ; USB image
  1383. $txtypos = $txtypos + 1.5 * $txtyoffset
  1384. $txtxpos = 2 * $txtxoffset
  1385. $usbcopy = GUICtrlCreateCheckbox( ShowGUIInGerman() ? 'Kopiere Updates für gewählte Produkte ins Verzeichnis:' : 'Copy updates for selected products into directory:' , _
  1386.                 $txtxpos , $txtypos , $groupwidth / 2 , $txtheight )
  1387. If IniRead( $inifilename , $ini_section_misc , $misc_token_skipdownload , $disabled ) = $enabled Then
  1388.     GUICtrlSetState( -1 , $GUI_UNCHECKED + $GUI_DISABLE )
  1389. Else
  1390.     If IniRead( $inifilename , $ini_section_usb , $usb_token_copy , $disabled ) = $enabled AND _
  1391.         IniRead( $inifilename , $ini_section_usb , $usb_token_path , '' ) <> '' Then
  1392.         GUICtrlSetState( -1 , $GUI_CHECKED )
  1393.     Else
  1394.         GUICtrlSetState( -1 , $GUI_UNCHECKED )
  1395.     EndIf
  1396. EndIf
  1397.  
  1398. ; USB target
  1399. $txtxpos = $txtxpos + $groupwidth / 2
  1400. $usbpath = GUICtrlCreateInput( IniRead( $inifilename , $ini_section_usb , $usb_token_path , '' ) , _
  1401.                 $txtxpos , $txtypos - 2 , 2 * $txtwidth - $txtxoffset - $txtheight , $txtheight )
  1402.  
  1403. ; USB FSF button - FileSelectFolder
  1404. $txtxpos = $txtxpos + 2 * $txtwidth - $txtxoffset - $txtheight
  1405. $usbfsf  = GUICtrlCreateButton( '...' , $txtxpos , $txtypos - 2 , $txtheight , $txtheight )
  1406.  
  1407. ; USB cleanup
  1408. $txtxpos  = $txtxpos + $txtheight + $txtxoffset
  1409. $usbclean = GUICtrlCreateCheckbox( ShowGUIInGerman() ? 'Zielverzeichnis bereinigen' : 'Clean up target directory' , _
  1410.                 $txtxpos , $txtypos , 2 * $txtwidth , $txtheight )
  1411. If IniRead( $inifilename , $ini_section_usb , $usb_token_cleanup , $disabled  ) = $enabled Then GUICtrlSetState( -1 , $GUI_CHECKED )
  1412. If IsCheckBoxChecked( $usbcopy ) Then
  1413.     GUICtrlSetState( $usbpath  , $GUI_ENABLE )
  1414.     GUICtrlSetState( $usbfsf   , $GUI_ENABLE )
  1415.     GUICtrlSetState( $usbclean , $GUI_ENABLE )
  1416. Else
  1417.     GUICtrlSetState( $usbpath  , $GUI_DISABLE )
  1418.     GUICtrlSetState( $usbfsf   , $GUI_DISABLE )
  1419.     GUICtrlSetState( $usbclean , $GUI_DISABLE )
  1420. EndIf
  1421.  
  1422. ; Start button
  1423. $txtxpos = $txtxoffset
  1424. $txtypos = $txtypos + 1.5 * $txtyoffset + $txtheight
  1425. $btn_start = GUICtrlCreateButton( 'Start' , $txtxpos , $txtypos , $btnwidth , $btnheight )
  1426. GUICtrlSetResizing( -1 , $GUI_DOCKLEFT + $GUI_DOCKBOTTOM )
  1427.  
  1428. ; Image only checkbox
  1429. $txtxpos   = $txtxpos + $btnwidth + $txtxoffset
  1430. $imageonly = GUICtrlCreateCheckbox( ShowGUIInGerman() ? 'Nur ISO / USB präparieren' : 'Only prepare ISO / USB' , _
  1431.                 $txtxpos , $txtypos , 2 * $txtwidth , $slimheight )
  1432. If IniRead( $inifilename , $ini_section_misc , $misc_token_skipdownload , $disabled ) = $enabled    Then GUICtrlSetState( -1 , $GUI_DISABLE )
  1433. If NOT IsCheckBoxChecked( $cdiso ) OR IsCheckBoxChecked( $dvdiso ) OR IsCheckBoxChecked( $usbcopy ) Then GUICtrlSetState( -1 , $GUI_DISABLE )
  1434.  
  1435. ; Scripting checkbox
  1436. $scripting = GUICtrlCreateCheckbox( ShowGUIInGerman() ? 'Nur Sammelskript erstellen' : 'Only create collection script' , _
  1437.                 $txtxpos , $txtypos + $slimheight , 2 * $txtwidth , $slimheight )
  1438. If IniRead( $inifilename , $ini_section_misc , $misc_token_showshutdown , $disabled ) = $enabled Then GUICtrlSetState( -1 , $GUI_HIDE )
  1439.  
  1440. ; Shutdown checkbox
  1441. $shutdown = GUICtrlCreateCheckbox( ShowGUIInGerman() ? 'Herunterfahren nach Abschluss' : 'Shut down on completion' , _
  1442.                 $txtxpos , $txtypos + $slimheight , 2 * $txtwidth , $slimheight )
  1443. If IniRead( $inifilename , $ini_section_misc , $misc_token_skipdownload , $disabled ) = $enabled  Then GUICtrlSetState( -1 , $GUI_DISABLE )
  1444. If IniRead( $inifilename , $ini_section_misc , $misc_token_showshutdown , $disabled ) = $disabled Then GUICtrlSetState( -1 , $GUI_HIDE )
  1445.  
  1446. ; Proxy button
  1447. $txtxpos   = 2 * $txtxoffset + $groupwidth / 2 - $btnwidth
  1448. $btn_proxy = GUICtrlCreateButton( 'Proxy...' , $txtxpos , $txtypos , $btnwidth , $btnheight )
  1449. GUICtrlSetResizing( -1 , $GUI_DOCKBOTTOM )
  1450. $proxy = IniRead( $inifilename , $ini_section_misc , $misc_token_proxy , '' )
  1451.  
  1452. ; WSUS button
  1453. $txtxpos  = 2 * $txtxoffset + $groupwidth / 2
  1454. $btn_wsus = GUICtrlCreateButton( 'WSUS...' , $txtxpos , $txtypos , $btnwidth , $btnheight )
  1455. GUICtrlSetResizing( -1 , $GUI_DOCKBOTTOM )
  1456. If IniRead( $inifilename , $ini_section_misc , $misc_token_skipdownload , $disabled ) = $enabled OR _
  1457.     IniRead( $inifilename , $ini_section_misc , $misc_token_skipdynamic  , $disabled ) = $enabled Then
  1458.     GUICtrlSetState( -1 , $GUI_DISABLE )
  1459. EndIf
  1460. $wsus = IniRead( $inifilename , $ini_section_misc , $misc_token_wsus , '' )
  1461.  
  1462. ; Donate button
  1463. $txtxpos    = 2.5 * $txtxoffset + 3 * $groupwidth / 4 - $btnwidth / 2
  1464. $btn_donate = GUICtrlCreateButton( ShowGUIInGerman() ? 'Spenden...' : 'Donate...' , $txtxpos , $txtypos , $btnwidth , $btnheight )
  1465. GUICtrlSetResizing( -1 , $GUI_DOCKBOTTOM )
  1466. If IniRead( $inifilename , $ini_section_misc , $misc_token_showdonate , $enabled ) = $disabled Then GUICtrlSetState( -1 , $GUI_HIDE )
  1467.  
  1468. ; Exit button
  1469. $txtxpos  = 3 * $txtxoffset + $groupwidth - $btnwidth
  1470. $btn_exit = GUICtrlCreateButton( ShowGUIInGerman() ? 'Ende' : 'Exit' , $txtxpos , $txtypos , $btnwidth , $btnheight )
  1471. GUICtrlSetResizing( -1 , $GUI_DOCKRIGHT + $GUI_DOCKBOTTOM )
  1472.  
  1473. ; Update Windows Controls
  1474. For $ii = 1 To $aMainArray[0][0]
  1475.     If $aMainArray[$ii][1] <> '' Then
  1476.         $aWinCtrSplit = StringSplit( $aMainArray[$ii][1] , '|' )
  1477.         For $jj = 1 To $aWinCtrSplit[0]
  1478.             $sCurrentVar = StringReplace( $aWinCtrSplit[$jj] & ' ' & $aMainArray[$ii][0] , ' ' , '_' )
  1479.             If StringInStr( $aWinCtrSplit[$jj] , 'w2k3' ) > 0 AND StringInStr( 'ell|ara|heb|dan|nor|fin' , $aMainArray[$ii][0] ) > 0 Then
  1480.                 GUICtrlSetData( Eval( $sCurrentVar ) , LanguageCaption( Eval( 'lang_token_' & $aMainArray[$ii][0] ) , ShowGUIInGerman()))
  1481.                 GUICtrlSetState( Eval( $sCurrentVar ) , $GUI_UNCHECKED )
  1482.                 GUICtrlSetState( Eval( $sCurrentVar ) , $GUI_DISABLE )
  1483.             ElseIf $aMainArray[$ii][0] = 'glb' Then
  1484.                 If StringInStr( $aWinCtrSplit[$jj] , 'x64' ) > 0 Then
  1485.                     $glb_label = ( ShowGUIInGerman() ? 'x64 Global (mehrsprachige updates)' : 'x64 Global (multilingual updates)' )
  1486.                 Else
  1487.                     $glb_label = ( ShowGUIInGerman() ? 'x86 Global (mehrsprachige updates)' : 'x86 Global (multilingual updates)' )
  1488.                 EndIf
  1489.                 GUICtrlSetData( Eval( $sCurrentVar ) , $glb_label )
  1490.                 If IniRead( $inifilename , Eval( 'ini_section_' & $aWinCtrSplit[$jj] ) , Eval( 'lang_token_' & $aMainArray[$ii][0] ) , $disabled ) = $enabled Then
  1491.                     GUICtrlSetState( Eval( $sCurrentVar ) , $GUI_CHECKED )
  1492.                 EndIf
  1493.             Else
  1494.                 GUICtrlSetData( Eval( $sCurrentVar ) , LanguageCaption( Eval( 'lang_token_' & $aMainArray[$ii][0] ) , ShowGUIInGerman()))
  1495.                 If IniRead( $inifilename , Eval( 'ini_section_' & $aWinCtrSplit[$jj] ) , Eval( 'lang_token_' & $aMainArray[$ii][0] ) , $disabled ) = $enabled Then
  1496.                     GUICtrlSetState( Eval( $sCurrentVar ) , $GUI_CHECKED )
  1497.                 EndIf
  1498.             EndIf
  1499.         Next
  1500.     EndIf
  1501. Next
  1502.  
  1503. ; Update Office Controls
  1504. For $ii = 1 To $aMainArray[0][0]
  1505.     If $aMainArray[$ii][2] <> '' Then
  1506.         $aOffCtrSplit = StringSplit( $aMainArray[$ii][2] , '|' )
  1507.         For $jj = 1 To $aOffCtrSplit[0]
  1508.             $sCurrentVar = StringReplace( $aOffCtrSplit[$jj] & ' ' & $aMainArray[$ii][0] , ' ' , '_' )
  1509.             GUICtrlSetData( Eval( $sCurrentVar ) , LanguageCaption( Eval( 'lang_token_' & $aMainArray[$ii][0] ) , ShowGUIInGerman()))
  1510.             If IniRead( $inifilename , Eval( 'ini_section_' & $aOffCtrSplit[$jj] ) , Eval( 'lang_token_' & $aMainArray[$ii][0] ) , $disabled ) = $enabled Then
  1511.                 GUICtrlSetState( Eval( $sCurrentVar ) , $GUI_CHECKED )
  1512.             EndIf
  1513.         Next
  1514.     EndIf
  1515. Next
  1516.  
  1517. ; GUI message loop
  1518. GUISetState()
  1519. If IsUNCPath( @ScriptDir ) Then
  1520.     If ShowGUIInGerman() Then
  1521.         $sMsgBoxTitle = 'Fehler'
  1522.         $sMsgBoxText  = 'Das Skript wurde von einem UNC-Pfad gestartet.' & @LF & _
  1523.                              'Bitte weisen Sie der Netzwerkfreigabe einen Laufwerksbuchstaben zu.'
  1524.     Else
  1525.         $sMsgBoxTitle = 'Error'
  1526.         $sMsgBoxText  = 'The script was started from a UNC path.' & @LF & _
  1527.                              'Please map a drive letter to the network share.'
  1528.     EndIf
  1529.     MsgBox( 0x2010 , $sMsgBoxTitle , $sMsgBoxText )
  1530.     Exit(1)
  1531. EndIf
  1532. If NOT PathValid( @ScriptDir ) Then
  1533.     If ShowGUIInGerman() Then
  1534.         $sMsgBoxTitle = 'Fehler'
  1535.         $sMsgBoxText  = 'Der Skript-Pfad darf nicht mehr als ' & $path_max_length & ' Zeichen lang sein und' & @LF & _
  1536.                              'darf keines der folgenden Zeichen enthalten: ' & $path_invalid_chars
  1537.     Else
  1538.         $sMsgBoxTitle = 'Error'
  1539.         $sMsgBoxText  = 'The script path must not be more than ' & $path_max_length & ' characters long and' & @LF & _
  1540.                              'must not contain any of the following characters: ' & $path_invalid_chars
  1541.     EndIf
  1542.     MsgBox( 0x2010 , $sMsgBoxTitle , $sMsgBoxText )
  1543.     Exit(1)
  1544. EndIf
  1545. If NOT PathValid( @TempDir ) Then
  1546.     If ShowGUIInGerman() Then
  1547.         $sMsgBoxTitle = 'Fehler'
  1548.         $sMsgBoxText  = 'Der %TEMP%-Pfad darf nicht mehr als ' & $path_max_length & ' Zeichen lang sein und' & @LF & _
  1549.                              'darf keines der folgenden Zeichen enthalten: ' & $path_invalid_chars
  1550.     Else
  1551.         $sMsgBoxTitle = 'Error'
  1552.         $sMsgBoxText  = 'The %TEMP% path must not be more than ' & $path_max_length & ' characters long and' & @LF & _
  1553.                              'must not contain any of the following characters: ' & $path_invalid_chars
  1554.     EndIf
  1555.     MsgBox( 0x2010 , $sMsgBoxTitle , $sMsgBoxText )
  1556.     Exit(1)
  1557. EndIf
  1558. If StringRight( EnvGet( 'TEMP' ) , 1 ) = '\' Then
  1559.     If ShowGUIInGerman() Then
  1560.         $sMsgBoxTitle = 'Fehler'
  1561.         $sMsgBoxText  = 'Der %TEMP%-Pfad enthält einen abschließenden Backslash "\".'
  1562.     Else
  1563.         $sMsgBoxTitle = 'Error'
  1564.         $sMsgBoxText  = 'The %TEMP% path contains a trailing backslash "\".'
  1565.     EndIf
  1566.     MsgBox( 0x2010 , $sMsgBoxTitle , $sMsgBoxText )
  1567.     Exit(1)
  1568. EndIf
  1569. If NOT DirectoryStructureExists() Then
  1570.     If ShowGUIInGerman() Then
  1571.         $sMsgBoxTitle = 'Fehler'
  1572.         $sMsgBoxText  = 'Die Verzeichnisstruktur ist unvollständig.' & @LF & _
  1573.                              'Bitte behalten Sie diese beim Entpacken des Zip-Archivs bei.'
  1574.     Else
  1575.         $sMsgBoxTitle = 'Error'
  1576.         $sMsgBoxText  = 'The directory structure is incomplete.' & @LF & _
  1577.                              'Please keep it when you unpack the Zip archive.'
  1578.     EndIf
  1579.     MsgBox( 0x2010 , $sMsgBoxTitle , $sMsgBoxText )
  1580.     Exit(1)
  1581. EndIf
  1582. While 1
  1583.     Switch GUIGetMsg()
  1584.         ; Window Closed
  1585.         Case $GUI_EVENT_CLOSE
  1586.             ExitLoop
  1587.  
  1588.         ; Exit Button Pressed
  1589.         Case $btn_exit
  1590.             ExitLoop
  1591.  
  1592.         ; 'Include Service Packs' Check Box Toggled
  1593.         Case $includesp
  1594.             If NOT IsCheckBoxChecked( $includesp ) AND IniRead( $inifilename , $ini_section_opts , $opts_token_cleanup , $enabled ) = $enabled Then
  1595.                 If ShowGUIInGerman() Then
  1596.                     $sMsgBoxTitle = 'Warnung'
  1597.                     $sMsgBoxText  = 'Durch die Option "Service-Packs ausschließen" werden bereits'           & @LF & _
  1598.                                          'heruntergeladene Service Packs für die selektierten Produkte gelöscht.' & @LF & _
  1599.                                          'Möchten Sie fortsetzen?'
  1600.                 Else
  1601.                     $sMsgBoxTitle = 'Warning'
  1602.                     $sMsgBoxText  = 'The option "Exclude Service Packs" will delete previously' & @LF & _
  1603.                                          'downloaded Service Packs for the selected products.'       & @LF & _
  1604.                                          'Do you wish to proceed?'
  1605.                 EndIf
  1606.                 If MsgBox( 0x2134 , $sMsgBoxTitle , $sMsgBoxText ) = $msgbox_btn_no Then GUICtrlSetState( $includesp , $GUI_CHECKED )
  1607.             EndIf
  1608.  
  1609.         ; CD ISO Image Button Pressed
  1610.         Case $cdiso
  1611.             If IsCheckBoxChecked( $cdiso ) OR IsCheckBoxChecked( $dvdiso ) OR IsCheckBoxChecked( $usbcopy ) Then
  1612.                 GUICtrlSetState( $imageonly , $GUI_ENABLE )
  1613.             Else
  1614.                 GUICtrlSetState( $imageonly , $GUI_UNCHECKED + $GUI_DISABLE )
  1615.                 If IniRead( $inifilename , $ini_section_misc , $misc_token_skipdownload , $disabled ) = $disabled Then
  1616.                     GUICtrlSetState( $verifydownloads , $GUI_ENABLE )
  1617.                     GUICtrlSetState( $shutdown , $GUI_ENABLE )
  1618.                 EndIf
  1619.             EndIf
  1620.  
  1621.         ; DVD ISO Image Button Pressed
  1622.         Case $dvdiso
  1623.             If IsCheckBoxChecked( $cdiso ) OR IsCheckBoxChecked( $dvdiso ) OR IsCheckBoxChecked( $usbcopy ) Then
  1624.                 GUICtrlSetState( $imageonly , $GUI_ENABLE )
  1625.             Else
  1626.                 GUICtrlSetState( $imageonly , $GUI_UNCHECKED + $GUI_DISABLE )
  1627.                 If IniRead( $inifilename , $ini_section_misc , $misc_token_skipdownload , $disabled ) = $disabled Then
  1628.                     GUICtrlSetState( $verifydownloads , $GUI_ENABLE )
  1629.                     GUICtrlSetState( $shutdown , $GUI_ENABLE )
  1630.                 EndIf
  1631.             EndIf
  1632.  
  1633.         ; USB Copy Button Pressed
  1634.         Case $usbcopy
  1635.             If IsCheckBoxChecked( $usbcopy ) Then
  1636.                 GUICtrlSetState( $usbpath  , $GUI_ENABLE )
  1637.                 GUICtrlSetState( $usbfsf   , $GUI_ENABLE )
  1638.                 GUICtrlSetState( $usbclean , $GUI_ENABLE )
  1639.             Else
  1640.                 GUICtrlSetState( $usbpath  , $GUI_DISABLE )
  1641.                 GUICtrlSetState( $usbfsf   , $GUI_DISABLE )
  1642.                 GUICtrlSetState( $usbclean , $GUI_DISABLE )
  1643.             EndIf
  1644.             If IsCheckBoxChecked( $cdiso ) OR IsCheckBoxChecked( $dvdiso ) OR IsCheckBoxChecked( $usbcopy ) Then
  1645.                 GUICtrlSetState( $imageonly , $GUI_ENABLE )
  1646.             Else
  1647.                 GUICtrlSetState( $imageonly , $GUI_UNCHECKED + $GUI_DISABLE )
  1648.                 If IniRead( $inifilename , $ini_section_misc , $misc_token_skipdownload , $disabled ) = $disabled Then
  1649.                     GUICtrlSetState( $verifydownloads , $GUI_ENABLE )
  1650.                     GUICtrlSetState( $shutdown , $GUI_ENABLE )
  1651.                 EndIf
  1652.             EndIf
  1653.  
  1654.         ; FSF Button Pressed
  1655.         Case $usbfsf
  1656.             If ShowGUIInGerman() Then
  1657.                 $FileSelectText = 'Wählen Sie das Zielverzeichnis:'
  1658.             Else
  1659.                 $FileSelectText = 'Choose target directory:'
  1660.             EndIf
  1661.             $dummy = FileSelectFolder( $FileSelectText , '' , 1 , GUICtrlRead( $usbpath ))
  1662.             If FileExists( $dummy ) Then GUICtrlSetData( $usbpath , $dummy )
  1663.  
  1664.         ; 'Clean up target directory' Check Box Toggled
  1665.         Case $usbclean
  1666.             If IsCheckBoxChecked( $usbclean ) Then
  1667.                 If ShowGUIInGerman() Then
  1668.                     $sMsgBoxTitle = 'Warnung'
  1669.                     $sMsgBoxText  = 'Durch die Option "Zielverzeichnis bereinigen"'      & @LF & _
  1670.                                          'werden dort bereits existierende Dateien gelöscht.' & @LF & _
  1671.                                          'Möchten Sie fortsetzen?'
  1672.                 Else
  1673.                     $sMsgBoxTitle = 'Warning'
  1674.                     $sMsgBoxText  = 'The option "Clean up target directory"' & @LF &  _
  1675.                                          'will delete existing files there.'      & @LF & _
  1676.                                          'Do you wish to proceed?'
  1677.                 EndIf
  1678.                 If MsgBox( 0x2134 , $sMsgBoxTitle , $sMsgBoxText ) = $msgbox_btn_no Then GUICtrlSetState( $usbclean , $GUI_UNCHECKED )
  1679.             EndIf
  1680.  
  1681.         ; Image Only Checkbox Toggled
  1682.         Case $imageonly
  1683.             If IsCheckBoxChecked( $imageonly ) Then
  1684.                 If ShowGUIInGerman() Then
  1685.                     $sMsgBoxTitle = 'Warnung'
  1686.                     $sMsgBoxText  = 'Durch diese Option verhindern Sie das Herunterladen aktueller Updates.' & @LF & _
  1687.                                          'Dies kann ein erhöhtes Sicherheitsrisiko für das Zielsystem bedeuten.'  & @LF & _
  1688.                                          'Möchten Sie fortsetzen?'
  1689.                 Else
  1690.                     $sMsgBoxTitle = 'Warning'
  1691.                     $sMsgBoxText  = 'This option prevents downloading of recent updates.'     & @LF & _
  1692.                                          'This may increase security risks for the target system.' & @LF & _
  1693.                                          'Do you wish to proceed?'
  1694.                 EndIf
  1695.                 If MsgBox( 0x2134 , $sMsgBoxTitle , $sMsgBoxText ) = $msgbox_btn_no Then
  1696.                     GUICtrlSetState( $imageonly , $GUI_UNCHECKED )
  1697.                 Else
  1698.                     GUICtrlSetState( $verifydownloads , $GUI_DISABLE )
  1699.                     GUICtrlSetState( $shutdown , $GUI_UNCHECKED + $GUI_DISABLE )
  1700.                 EndIf
  1701.             Else
  1702.                 If IniRead( $inifilename , $ini_section_misc , $misc_token_skipdownload , $disabled ) = $disabled Then
  1703.                     GUICtrlSetState( $verifydownloads , $GUI_ENABLE )
  1704.                     GUICtrlSetState( $shutdown , $GUI_ENABLE )
  1705.                 EndIf
  1706.             EndIf
  1707.  
  1708.         ; Proxy Button Pressed
  1709.         Case $btn_proxy
  1710.             If ShowGUIInGerman() Then
  1711.                 $sInputBoxTitle = 'HTTP-Proxy-Einstellung'
  1712.                 $sInputBoxText  = 'ACHTUNG: Sonderzeichen müssen hier gemäß RFC1738 codiert werden.'   & @LF & _
  1713.                                         'Um die Speicherung Ihres Passworts zu vermeiden,'                   & @LF & _
  1714.                                         'lassen Sie es hier bitte weg (http://Benutzername:@Server[:Port]).' & @LF & @LF & _
  1715.                                         'Bitte geben Sie Ihre HTTP-Proxy-URL ein'                            & @LF & _
  1716.                                         '(http://[Benutzername:[Passwort]@]Server[:Port]):'
  1717.             Else
  1718.                 $sInputBoxTitle = 'HTTP Proxy setting'
  1719.                 $sInputBoxText  = 'NOTE: Special characters have to be encoded according to RFC1738 here.' & @LF & _
  1720.                                         'To avoid storage of your password, please omit it here' & @LF & _
  1721.                                         '(http://username:@server[:port]).'                      & @LF & @LF & _
  1722.                                         'Please enter your HTTP Proxy URL'                       & @LF & _
  1723.                                         '(http://[username:[password]@]server[:port]):'
  1724.             EndIf
  1725.             $dummy = InputBox( $sInputBoxTitle , $sInputBoxText , $proxy , '' , 420 )
  1726.             If @error = 0 AND $proxy <> $dummy Then
  1727.                 $proxy = $dummy
  1728.                 $proxypwd = ""
  1729.             EndIf
  1730.  
  1731.         ; WSUS Button Pressed
  1732.         Case $btn_wsus
  1733.             If ShowGUIInGerman() Then
  1734.                 $sInputBoxTitle = 'WSUS-Einstellung'
  1735.                 $sInputBoxText  = 'Bitte geben Sie Ihre WSUS-URL ein' & @LF & '(http://server):'
  1736.             Else
  1737.                 $sInputBoxTitle = 'WSUS setting'
  1738.                 $sInputBoxText  = 'Please enter your WSUS URL' & @LF & '(http://server):'
  1739.             EndIf
  1740.             $dummy = InputBox( $sInputBoxTitle , $sInputBoxText , $wsus , '' , 220 )
  1741.             If @error = 0 Then
  1742.                 $wsus = $dummy
  1743.             EndIf
  1744.  
  1745.         ; Donate Button Pressed
  1746.         Case $btn_donate
  1747.             ShellExecute( $donationURL )
  1748.  
  1749.         ; Start Button Pressed
  1750.         Case $btn_start
  1751.             $runany = False
  1752.             If NOT IsCheckBoxChecked( $imageonly ) Then
  1753.                 If StringInStr( $proxy , ':@' ) > 0 AND $proxypwd = '' Then
  1754.                     If ShowGUIInGerman() Then
  1755.                         $sInputBoxTitle = 'HTTP-Proxy-Passwort'
  1756.                         $sInputBoxText  = 'ACHTUNG: Bitte codieren Sie Sonderzeichen hier nicht.' & @LF & _
  1757.                                                 'Dies geschieht automatisch.'                           & @LF & @LF & _
  1758.                                                 'Bitte geben Sie Ihr HTTP-Proxy-Passwort ein:'
  1759.                     Else
  1760.                         $sInputBoxTitle = 'HTTP Proxy password'
  1761.                         $sInputBoxText  = 'NOTE: Please do not encode special characters here.' & @LF & _
  1762.                                                 'This will be done automatically.'                    & @LF & @LF & _
  1763.                                                 'Please enter your HTTP Proxy password:'
  1764.                     EndIf
  1765.                     $dummy = InputBox( $sInputBoxTitle , $sInputBoxText , '' , '*' , 300 )
  1766.                     If @error = 0 Then
  1767.                         $proxypwd = RFC1738EncodedString( $dummy )
  1768.                     Else
  1769.                         ContinueLoop
  1770.                     EndIf
  1771.                 EndIf
  1772.                 If IniRead( $inifilename , $ini_section_misc , $misc_token_chkver , $enabled ) = $enabled Then
  1773.                     Switch RunVersionCheck( AuthProxy( $proxy , $proxypwd ))
  1774.                         ; Yes
  1775.                         Case -1
  1776.                             RunSelfUpdate( AuthProxy( $proxy , $proxypwd ))
  1777.                             ExitLoop
  1778.  
  1779.                         ; Cancel / Close
  1780.                         Case 1
  1781.                             ContinueLoop
  1782.                     EndSwitch
  1783.                 EndIf
  1784.             EndIf
  1785.         If IniRead( $inifilename , $ini_section_misc , $misc_token_wsus_trans , $disabled ) = $enabled AND $wsus <> '' Then
  1786.             IniWrite( ClientIniFileName() , $ini_section_misc , $misc_token_clt_wustat , $wsus )
  1787.         Else
  1788.             IniDelete( ClientIniFileName() , $ini_section_misc , $misc_token_clt_wustat )
  1789.         EndIf
  1790.         If IniRead( $inifilename , $ini_section_misc , $misc_token_minimize , $disabled ) = $enabled Then
  1791.             WinSetState( $maindlg , $maindlg , @SW_MINIMIZE )
  1792.         EndIf
  1793.  
  1794.             ; Windows
  1795.             For $ii = 1 To $aMainArray[0][0]
  1796.                 If $aMainArray[$ii][1] <> '' Then
  1797.                     $aBtnWinSplit = StringSplit( $aMainArray[$ii][1] , '|' )
  1798.                     For $jj = 1 To $aBtnWinSplit[0]
  1799.                         If StringInStr( $aBtnWinSplit[$jj] , 'w2k3' ) > 0 AND StringInStr( 'ell|ara|heb|dan|nor|fin' , $aMainArray[$ii][0] ) > 0 Then ContinueLoop
  1800.                         $sCurrentVar1 = StringReplace( $aBtnWinSplit[$jj] & ' ' & $aMainArray[$ii][0] , ' ' , '_' )
  1801.                         $sCurrentVar2 = StringReplace( $aBtnWinSplit[$jj] , ' ' , '-' ) & ' ' & $aMainArray[$ii][0]
  1802.                         If IsCheckBoxChecked( Eval( $sCurrentVar1 )) Then
  1803.                             If RunScripts( $sCurrentVar2 , IsCheckBoxChecked( $imageonly ) , DetermineDownloadSwitches( $includesp , $dotnet , $wle , $msse , $wddefs , $verifydownloads , AuthProxy( $proxy , $proxypwd ) , $wsus ) , IsCheckBoxChecked( $cdiso ) , DetermineISOSwitches( $includesp , $dotnet , $wle , $msse , $wddefs , $usbclean ) , IsCheckBoxChecked( $usbcopy ) , GUICtrlRead( $usbpath )) <> 0 Then
  1804.                                 ContinueLoop 3
  1805.                             EndIf
  1806.                         EndIf
  1807.                     Next
  1808.                 EndIf
  1809.             Next
  1810.  
  1811.             ; Office Global
  1812.             If IsLangOfficeChecked() Then
  1813.                 If RunScripts( 'ofc glb' , IsCheckBoxChecked( $imageonly ) , DetermineDownloadSwitches( $includesp , $dotnet , $wle , $msse , $wddefs , $verifydownloads , AuthProxy( $proxy , $proxypwd ) , $wsus ) , False , DetermineISOSwitches( $includesp , $dotnet , $wle , $msse , $wddefs , $usbclean ) , False , GUICtrlRead( $usbpath )) <> 0 Then
  1814.                     ContinueLoop
  1815.                 EndIf
  1816.             EndIf
  1817.  
  1818.             ; Office
  1819.             For $ii = 1 To $aMainArray[0][0]
  1820.                 If $aMainArray[$ii][2] <> '' Then
  1821.                     $aBtnOffSplit = StringSplit( $aMainArray[$ii][2] , '|' )
  1822.                     For $jj = 1 To $aBtnOffSplit[0]
  1823.                         $sCurrentVar = StringReplace( $aBtnOffSplit[$jj] & ' ' & $aMainArray[$ii][0] , ' ' , '_' )
  1824.                         If IsCheckBoxChecked( Eval( $sCurrentVar )) Then
  1825.                             If RunScripts( $aBtnOffSplit[$jj] & ' ' & $aMainArray[$ii][0] , IsCheckBoxChecked( $imageonly ) , DetermineDownloadSwitches( $includesp , $dotnet , $wle , $msse , $wddefs , $verifydownloads , AuthProxy( $proxy , $proxypwd ) , $wsus ) , False , DetermineISOSwitches( $includesp , $dotnet , $wle , $msse , $wddefs , $usbclean ) , False , GUICtrlRead( $usbpath )) <> 0 Then
  1826.                                 ContinueLoop 3
  1827.                             EndIf
  1828.                         EndIf
  1829.                     Next
  1830.                 EndIf
  1831.             Next
  1832.  
  1833.             ; Office Language Specific
  1834.             For $ii = 1 To $aMainArray[0][0]
  1835.                 If $aMainArray[$ii][2] <> '' Then
  1836.                     $aOffLangSplit = StringSplit( $aMainArray[$ii][2] , '|' )
  1837.                     For $jj = 1 To $aOffLangSplit[0]
  1838.                         $sCurrentVal = StringReplace( $aOffLangSplit[$jj] & ' ' & $aMainArray[$ii][0] , ' ' , '_' )
  1839.                         If IsCheckBoxChecked( Eval( $sCurrentVal )) Then
  1840.                             If RunScripts( 'ofc ' & $aMainArray[$ii][0] , True , DetermineDownloadSwitches( $includesp , $dotnet , $wle , $msse , $wddefs , $verifydownloads , AuthProxy( $proxy , $proxypwd ) , $wsus ) , IsCheckBoxChecked( $cdiso ) , DetermineISOSwitches( $includesp , $dotnet , $wle , $msse , $wddefs , $usbclean ) , IsCheckBoxChecked( $usbcopy ) , GUICtrlRead( $usbpath )) <> 0 Then
  1841.                                 ContinueLoop 3
  1842.                             EndIf
  1843.                         EndIf
  1844.                     Next
  1845.                 EndIf
  1846.             Next
  1847.  
  1848.             ; Create cross-platform DVD ISO images
  1849.             If IsCheckBoxChecked( $dvdiso ) Then
  1850.                 ; Windows Server 2003
  1851.                 For $ii = 1 To $aMainArray[0][0]
  1852.                     If StringInStr( $aMainArray[$ii][1] , 'w2k3' ) = 0 Then ContinueLoop
  1853.                     If IsCheckBoxChecked( Eval( 'w2k3_' & $aMainArray[$ii][0] )) Then
  1854.                         If RunISOCreationScript( Eval( 'lang_token_' & $aMainArray[$ii][0] ) , DetermineISOSwitches( $includesp , $dotnet , $wle , $msse , $wddefs , $usbclean )) <> 0 Then
  1855.                             ContinueLoop 2
  1856.                         EndIf
  1857.                     EndIf
  1858.                 Next
  1859.                 ; Office
  1860.                 For $ii = 1 To $aMainArray[0][0]
  1861.                     If $aMainArray[$ii][2] <> '' Then
  1862.                         $aOffIsoSplit = StringSplit( $aMainArray[$ii][2] , '|' )
  1863.                         For $jj = 1 To $aOffIsoSplit[0]
  1864.                             $sCurrentVal = StringReplace( $aOffIsoSplit[$jj] & ' ' & $aMainArray[$ii][0] , ' ' , '_' )
  1865.                             If IsCheckBoxChecked( Eval( $sCurrentVal )) Then
  1866.                                 If RunISOCreationScript( Eval( 'lang_token_' & $aMainArray[$ii][0] ) , DetermineISOSwitches( $includesp , $dotnet , $wle , $msse , $wddefs , $usbclean )) <> 0 Then
  1867.                                     ContinueLoop 3
  1868.                                 EndIf
  1869.                             EndIf
  1870.                         Next
  1871.                     EndIf
  1872.                 Next
  1873.             EndIf
  1874.  
  1875.             ; Restore Window And Show Success Dialog
  1876.             WinSetState( $maindlg , $maindlg , @SW_RESTORE )
  1877.             If $runany Then
  1878.                 If IsCheckBoxChecked( $scripting ) Then
  1879.                     If ShowGUIInGerman() Then
  1880.                         $sMsgBoxTitle = 'Info'
  1881.                         $sMsgBoxText  = 'Sammelskript "' & @ScriptDir & '\cmd\custom\RunAll.cmd" erstellt.' & @LF & _
  1882.                                              'Möchten Sie das Skript nun prüfen?'
  1883.                     Else
  1884.                         $sMsgBoxTitle = 'Info'
  1885.                         $sMsgBoxText  = 'Collection script "' & @ScriptDir & '\cmd\custom\RunAll.cmd" created.' & @LF & _
  1886.                                              'Would you like to check the script now?'
  1887.                     EndIf
  1888.                     If MsgBox( 0x2044 , $sMsgBoxTitle , $sMsgBoxText ) = $msgbox_btn_yes Then ShowRunAll()
  1889.                 Else
  1890.                     If IsCheckBoxChecked( $shutdown ) Then
  1891.                         Run( @SystemDir & '\shutdown.exe /s /f /t 5' , '' , @SW_HIDE )
  1892.                         ExitLoop
  1893.                     EndIf
  1894.                     If IsCheckBoxChecked( $imageonly ) Then
  1895.                         If ShowGUIInGerman() Then
  1896.                             $sMsgBoxTitle = 'Info'
  1897.                             $sMsgBoxText  = 'Image-Erstellung / Kopieren erfolgreich.'
  1898.                         Else
  1899.                             $sMsgBoxTitle = 'Info'
  1900.                             $sMsgBoxText  = 'Image creation / copying successful.'
  1901.                         EndIf
  1902.                         MsgBox( 0x2040 , $sMsgBoxTitle , $sMsgBoxText )
  1903.                     Else
  1904.                         If ShowGUIInGerman() Then
  1905.                             $sMsgBoxTitle = 'Info'
  1906.                             $sMsgBoxText  = 'Herunterladen / Image-Erstellung / Kopieren erfolgreich.' & @LF & _
  1907.                                                  'Möchten Sie nun die Protokolldatei auf mögliche Warnungen prüfen?'
  1908.                         Else
  1909.                             $sMsgBoxTitle = 'Info'
  1910.                             $sMsgBoxText  = 'Download / image creation / copying successful.' & @LF & _
  1911.                                                  'Would you like to check the log file for possible warnings now?'
  1912.                         EndIf
  1913.                         If MsgBox( 0x2044 , $sMsgBoxTitle , $sMsgBoxText ) = $msgbox_btn_yes Then ShowLogFile()
  1914.                     EndIf
  1915.                 EndIf
  1916.             Else
  1917.                 If ShowGUIInGerman() Then
  1918.                     $sMsgBoxTitle = 'Info'
  1919.                     $sMsgBoxText  = 'Nichts zu tun!'
  1920.                 Else
  1921.                     $sMsgBoxTitle = 'Info'
  1922.                     $sMsgBoxText  = 'Nothing to do!'
  1923.                 EndIf
  1924.                 MsgBox( 0x2040 , $sMsgBoxTitle , $sMsgBoxText )
  1925.             EndIf
  1926.  
  1927.     EndSwitch
  1928. WEnd
  1929. SaveSettings()
  1930. Exit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement