Advertisement
Nologic

WSUS Offline Update Rev 1

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