Advertisement
Nologic

WSUS Offline Update Rev 2

Jul 6th, 2015
269
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AutoIt 105.28 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. GUICtrlCreateGroup( ShowGUIInGerman() ? 'Produkt-Lebenszyklus-Informationen' : 'Product lifecycle information' , _
  1823.                 $txtxpos , $txtypos , $groupwidth , $groupheight_glb )
  1824.  
  1825. ; Product Lifecycle label
  1826. $txtypos = $txtypos + 2 * $txtyoffset
  1827. $txtxpos = 3 * $txtxoffset
  1828. GUICtrlCreateLabel( ShowGUIInGerman() ? 'Diese Produkte wurden von Microsoft zum 14. Juli 2015 abgekündigt.' : 'Microsoft will discontinue support for these products on July 14th, 2015.' , _
  1829.                 $txtxpos , $txtypos , $groupwidth - 2 * $txtxoffset , $txtheight )
  1830.  
  1831. ; End Tab item definition
  1832. GuiCtrlCreateTabItem('')
  1833. GUICtrlSetState( $tabitemfocused , $GUI_SHOW )
  1834.  
  1835. ; Options group
  1836. $txtxpos = $txtxoffset
  1837. $txtypos = $groupheight_lng + 4 * $groupheight_glb + 7 * $txtyoffset
  1838. GUICtrlCreateGroup( ShowGUIInGerman() ? 'Optionen' : 'Options' , $txtxpos , $txtypos , $groupwidth + 2 * $txtxoffset , $groupheight_lng )
  1839.  
  1840. ; Verify downloads
  1841. $txtxpos = 2 * $txtxoffset
  1842. $txtypos = $txtypos + 1.5 * $txtyoffset
  1843. $verifydownloads = GUICtrlCreateCheckbox( ShowGUIInGerman() ? 'Heruntergeladene Updates verifizieren' : 'Verify downloaded updates' , _
  1844.                 $txtxpos , $txtypos , $groupwidth / 2 , $txtheight )
  1845. If IniRead( $inifilename , $ini_section_opts , $opts_token_verify , $enabled ) = $enabled Then
  1846.     GUICtrlSetState( -1 , $GUI_CHECKED )
  1847. Else
  1848.     GUICtrlSetState( -1 , $GUI_UNCHECKED )
  1849. EndIf
  1850. If IniRead( $inifilename , $ini_section_misc , $misc_token_skipdownload , $disabled ) = $enabled Then GUICtrlSetState( -1 , $GUI_DISABLE )
  1851.  
  1852. ; Include Service Packs
  1853. $txtxpos   = $txtxpos + $groupwidth / 2
  1854. $includesp = GUICtrlCreateCheckbox( ShowGUIInGerman() ? 'Service-Packs einschließen' : 'Include Service Packs' , _
  1855.                 $txtxpos , $txtypos , $groupwidth / 2 , $txtheight )
  1856. If IniRead( $inifilename , $ini_section_opts , $opts_token_allowsp , $enabled ) = $enabled Then
  1857.     If IniRead( $inifilename , $ini_section_opts , $opts_token_includesp , $enabled ) = $enabled Then
  1858.         GUICtrlSetState( -1 , $GUI_CHECKED )
  1859.     Else
  1860.         GUICtrlSetState( -1 , $GUI_UNCHECKED )
  1861.     EndIf
  1862. Else
  1863.     GUICtrlSetState( -1 , $GUI_UNCHECKED + $GUI_DISABLE )
  1864. EndIf
  1865. If IniRead( $inifilename , $ini_section_misc , $misc_token_skipdownload , $disabled ) = $enabled Then GUICtrlSetState( -1 , $GUI_DISABLE )
  1866.  
  1867. ; Include .NET Frameworks 3.5 SP1 and 4
  1868. $txtxpos = 2 * $txtxoffset
  1869. $txtypos = $txtypos + $txtheight
  1870. $dotnet  = GUICtrlCreateCheckbox( ShowGUIInGerman() ? 'C++-Laufzeitbibliotheken und .NET Frameworks einschließen' : 'Include C++ Runtime Libraries and .NET Frameworks' , _
  1871.                 $txtxpos , $txtypos , $groupwidth / 2 , $txtheight )
  1872. If IniRead( $inifilename , $ini_section_opts , $opts_token_allowdotnet , $enabled ) = $enabled Then
  1873.     If IniRead( $inifilename , $ini_section_opts , $opts_token_includedotnet , $disabled ) = $enabled Then
  1874.         GUICtrlSetState( -1 , $GUI_CHECKED )
  1875.     Else
  1876.         GUICtrlSetState( -1 , $GUI_UNCHECKED )
  1877.     EndIf
  1878. Else
  1879.     GUICtrlSetState( -1 , $GUI_UNCHECKED + $GUI_DISABLE )
  1880. EndIf
  1881.  
  1882. ; Include Windows Essentials 2012
  1883. $txtxpos = $txtxpos + $groupwidth / 2
  1884. $wle     = GUICtrlCreateCheckbox( ShowGUIInGerman() ? 'Windows Essentials 2012 einschließen' : 'Include Windows Essentials 2012' , _
  1885.                 $txtxpos , $txtypos , $groupwidth / 2 , $txtheight )
  1886. If IniRead( $inifilename , $ini_section_opts , $opts_token_wle , $disabled ) = $enabled Then
  1887.     GUICtrlSetState( -1 , $GUI_CHECKED )
  1888. Else
  1889.     GUICtrlSetState( -1 , $GUI_UNCHECKED )
  1890. EndIf
  1891. If IniRead( $inifilename , $ini_section_misc , $misc_token_skipdownload , $disabled ) = $enabled Then GUICtrlSetState( -1 , $GUI_DISABLE )
  1892.  
  1893. ; Include Microsoft Security Essentials
  1894. $txtxpos = 2 * $txtxoffset
  1895. $txtypos = $txtypos + $txtheight
  1896. $msse    = GUICtrlCreateCheckbox( ShowGUIInGerman() ? 'Microsoft Security Essentials einschließen' : 'Include Microsoft Security Essentials' , _
  1897.                 $txtxpos , $txtypos , $groupwidth / 2 , $txtheight )
  1898. If IniRead( $inifilename , $ini_section_opts , $opts_token_msse , $disabled ) = $enabled Then
  1899.     GUICtrlSetState( -1 , $GUI_CHECKED )
  1900. Else
  1901.     GUICtrlSetState( -1 , $GUI_UNCHECKED )
  1902. EndIf
  1903. If IniRead( $inifilename , $ini_section_misc , $misc_token_skipdownload , $disabled ) = $enabled Then GUICtrlSetState( -1 , $GUI_DISABLE )
  1904.  
  1905. ; Include Windows Defender definitions
  1906. $txtxpos = $txtxpos + $groupwidth / 2
  1907. $wddefs  = GUICtrlCreateCheckbox( ShowGUIInGerman() ? 'Windows Defender-Definitionen einschließen' : 'Include Windows Defender definitions' , _
  1908.                 $txtxpos , $txtypos , $groupwidth / 2 , $txtheight )
  1909. If IniRead( $inifilename , $ini_section_opts , $opts_token_wddefs , $disabled ) = $enabled Then
  1910.     GUICtrlSetState( -1 , $GUI_CHECKED )
  1911. Else
  1912.     GUICtrlSetState( -1 , $GUI_UNCHECKED )
  1913. EndIf
  1914. If IniRead( $inifilename , $ini_section_misc , $misc_token_skipdownload , $disabled ) = $enabled Then GUICtrlSetState( -1 , $GUI_DISABLE )
  1915.  
  1916. ; ISO-Image group
  1917. $txtxpos = $txtxoffset
  1918. $txtypos = $txtypos + 2.5 * $txtyoffset
  1919. GUICtrlCreateGroup( ShowGUIInGerman() ? 'Erstelle ISO-Image(s)...' : 'Create ISO image(s)...' , _
  1920.                 $txtxpos , $txtypos , $groupwidth + 2 * $txtxoffset ,  $groupheight_glb )
  1921.  
  1922. ; CD ISO image
  1923. $txtypos = $txtypos + 1.5 * $txtyoffset
  1924. $txtxpos = 2 * $txtxoffset
  1925. $cdiso   = GUICtrlCreateCheckbox( ShowGUIInGerman() ? 'pro Produkt und Sprache' : 'per selected product and language' , _
  1926.                 $txtxpos , $txtypos , $groupwidth / 2 , $txtheight )
  1927. If IniRead( $inifilename , $ini_section_misc , $misc_token_skipdownload , $disabled ) = $enabled Then
  1928.     GUICtrlSetState( -1 , $GUI_UNCHECKED + $GUI_DISABLE )
  1929. Else
  1930.     If IniRead( $inifilename , $ini_section_iso , $iso_token_cd , $disabled ) = $enabled Then
  1931.         GUICtrlSetState( -1 , $GUI_CHECKED )
  1932.     Else
  1933.         GUICtrlSetState( -1 , $GUI_UNCHECKED )
  1934.     EndIf
  1935. EndIf
  1936.  
  1937. ; Cross-Platform DVD ISO image
  1938. $txtxpos = $txtxpos + $groupwidth / 2
  1939. $dvdiso  = GUICtrlCreateCheckbox( ShowGUIInGerman() ? 'pro Sprache, x86-produktübergreifend (nur Desktop-Produkte)' : 'per selected language, x86-cross-product (desktop only)' , _
  1940.                 $txtxpos , $txtypos , $groupwidth / 2 , $txtheight )
  1941. If IniRead( $inifilename , $ini_section_misc , $misc_token_skipdownload , $disabled ) = $enabled Then
  1942.     GUICtrlSetState( -1 , $GUI_UNCHECKED + $GUI_DISABLE )
  1943. Else
  1944.     If IniRead( $inifilename , $ini_section_iso , $iso_token_dvd , $disabled ) = $enabled Then
  1945.         GUICtrlSetState( -1 , $GUI_CHECKED )
  1946.     Else
  1947.         GUICtrlSetState( -1 , $GUI_UNCHECKED )
  1948.     EndIf
  1949. EndIf
  1950.  
  1951. ; USB-Image group
  1952. $txtxpos = $txtxoffset
  1953. $txtypos = $txtypos + 2.5 * $txtyoffset
  1954. GUICtrlCreateGroup( ShowGUIInGerman() ? 'USB-Medium' : 'USB Medium' , $txtxpos , $txtypos , $groupwidth + 2 * $txtxoffset ,  $groupheight_glb )
  1955.  
  1956. ; USB image
  1957. $txtypos = $txtypos + 1.5 * $txtyoffset
  1958. $txtxpos = 2 * $txtxoffset
  1959. $usbcopy = GUICtrlCreateCheckbox( ShowGUIInGerman() ? 'Kopiere Updates für gewählte Produkte ins Verzeichnis:' : 'Copy updates for selected products into directory:' , _
  1960.                 $txtxpos , $txtypos , $groupwidth / 2 , $txtheight )
  1961. If IniRead( $inifilename , $ini_section_misc , $misc_token_skipdownload , $disabled ) = $enabled Then
  1962.     GUICtrlSetState( -1 , $GUI_UNCHECKED + $GUI_DISABLE )
  1963. Else
  1964.     If IniRead( $inifilename , $ini_section_usb , $usb_token_copy , $disabled ) = $enabled AND _
  1965.         IniRead( $inifilename , $ini_section_usb , $usb_token_path , '' ) <> '' Then
  1966.         GUICtrlSetState( -1 , $GUI_CHECKED )
  1967.     Else
  1968.         GUICtrlSetState( -1 , $GUI_UNCHECKED )
  1969.     EndIf
  1970. EndIf
  1971.  
  1972. ; USB target
  1973. $txtxpos = $txtxpos + $groupwidth / 2
  1974. $usbpath = GUICtrlCreateInput( IniRead( $inifilename , $ini_section_usb , $usb_token_path , '' ) , _
  1975.                 $txtxpos , $txtypos - 2 , 2 * $txtwidth - $txtxoffset - $txtheight , $txtheight )
  1976.  
  1977. ; USB FSF button - FileSelectFolder
  1978. $txtxpos = $txtxpos + 2 * $txtwidth - $txtxoffset - $txtheight
  1979. $usbfsf  = GUICtrlCreateButton( '...' , $txtxpos , $txtypos - 2 , $txtheight , $txtheight )
  1980.  
  1981. ; USB cleanup
  1982. $txtxpos  = $txtxpos + $txtheight + $txtxoffset
  1983. $usbclean = GUICtrlCreateCheckbox( ShowGUIInGerman() ? 'Zielverzeichnis bereinigen' : 'Clean up target directory' , _
  1984.                 $txtxpos , $txtypos , 2 * $txtwidth , $txtheight )
  1985. If IniRead( $inifilename , $ini_section_usb , $usb_token_cleanup , $disabled ) = $enabled Then
  1986.     GUICtrlSetState( -1 , $GUI_CHECKED )
  1987. Else
  1988.     GUICtrlSetState( -1 , $GUI_UNCHECKED )
  1989. EndIf
  1990. If IsCheckBoxChecked( $usbcopy ) Then
  1991.     GUICtrlSetState( $usbpath  , $GUI_ENABLE )
  1992.     GUICtrlSetState( $usbfsf   , $GUI_ENABLE )
  1993.     GUICtrlSetState( $usbclean , $GUI_ENABLE )
  1994. Else
  1995.     GUICtrlSetState( $usbpath  , $GUI_DISABLE )
  1996.     GUICtrlSetState( $usbfsf   , $GUI_DISABLE )
  1997.     GUICtrlSetState( $usbclean , $GUI_DISABLE )
  1998. EndIf
  1999.  
  2000. ; Start button
  2001. $txtxpos = $txtxoffset
  2002. $txtypos = $txtypos + 1.5 * $txtyoffset + $txtheight
  2003. $btn_start = GUICtrlCreateButton( 'Start' , $txtxpos , $txtypos , $btnwidth , $btnheight )
  2004. GUICtrlSetResizing( -1 , $GUI_DOCKLEFT + $GUI_DOCKBOTTOM )
  2005.  
  2006. ; Image only checkbox
  2007. $txtxpos   = $txtxpos + $btnwidth + $txtxoffset
  2008. $imageonly = GUICtrlCreateCheckbox( ShowGUIInGerman() ? 'Nur ISO / USB präparieren' : 'Only prepare ISO / USB' , _
  2009.                 $txtxpos , $txtypos , 2 * $txtwidth , $slimheight )
  2010. If IniRead( $inifilename , $ini_section_misc , $misc_token_skipdownload , $disabled ) = $enabled    Then GUICtrlSetState( -1 , $GUI_DISABLE )
  2011. If NOT IsCheckBoxChecked( $cdiso ) OR IsCheckBoxChecked( $dvdiso ) OR IsCheckBoxChecked( $usbcopy ) Then GUICtrlSetState( -1 , $GUI_DISABLE )
  2012.  
  2013. ; Scripting checkbox
  2014. $scripting = GUICtrlCreateCheckbox( ShowGUIInGerman() ? 'Nur Sammelskript erstellen' : 'Only create collection script' , _
  2015.                 $txtxpos , $txtypos + $slimheight , 2 * $txtwidth , $slimheight )
  2016. If IniRead( $inifilename , $ini_section_misc , $misc_token_showshutdown , $disabled ) = $enabled Then GUICtrlSetState( -1 , $GUI_HIDE )
  2017.  
  2018. ; Shutdown checkbox
  2019. $shutdown = GUICtrlCreateCheckbox( ShowGUIInGerman() ? 'Herunterfahren nach Abschluss' : 'Shut down on completion' , _
  2020.                 $txtxpos , $txtypos + $slimheight , 2 * $txtwidth , $slimheight )
  2021. If IniRead( $inifilename , $ini_section_misc , $misc_token_skipdownload , $disabled ) = $enabled  Then GUICtrlSetState( -1 , $GUI_DISABLE )
  2022. If IniRead( $inifilename , $ini_section_misc , $misc_token_showshutdown , $disabled ) = $disabled Then GUICtrlSetState( -1 , $GUI_HIDE )
  2023.  
  2024. ; Proxy button
  2025. $txtxpos   = 2 * $txtxoffset + $groupwidth / 2 - $btnwidth
  2026. $btn_proxy = GUICtrlCreateButton( 'Proxy...' , $txtxpos , $txtypos , $btnwidth , $btnheight )
  2027. GUICtrlSetResizing( -1 , $GUI_DOCKBOTTOM )
  2028. $proxy = IniRead( $inifilename , $ini_section_misc , $misc_token_proxy , '' )
  2029.  
  2030. ; WSUS button
  2031. $txtxpos  = 2 * $txtxoffset + $groupwidth / 2
  2032. $btn_wsus = GUICtrlCreateButton( 'WSUS...' , $txtxpos , $txtypos , $btnwidth , $btnheight )
  2033. GUICtrlSetResizing( -1 , $GUI_DOCKBOTTOM )
  2034. If IniRead( $inifilename , $ini_section_misc , $misc_token_skipdownload , $disabled ) = $enabled OR _
  2035.     IniRead( $inifilename , $ini_section_misc , $misc_token_skipdynamic  , $disabled ) = $enabled Then
  2036.     GUICtrlSetState( -1 , $GUI_DISABLE )
  2037. EndIf
  2038. $wsus = IniRead($inifilename, $ini_section_misc, $misc_token_wsus, "")
  2039.  
  2040. ; Donate button
  2041. $txtxpos    = 2.5 * $txtxoffset + 3 * $groupwidth / 4 - $btnwidth / 2
  2042. $btn_donate = GUICtrlCreateButton( ShowGUIInGerman() ? 'Spenden...' : 'Donate...' , $txtxpos , $txtypos , $btnwidth , $btnheight )
  2043. GUICtrlSetResizing( -1 , $GUI_DOCKBOTTOM )
  2044. If IniRead( $inifilename , $ini_section_misc , $misc_token_showdonate , $enabled ) = $disabled Then
  2045.     GUICtrlSetState( -1 , $GUI_HIDE )
  2046. EndIf
  2047.  
  2048. ; Exit button
  2049. $txtxpos  = 3 * $txtxoffset + $groupwidth - $btnwidth
  2050. $btn_exit = GUICtrlCreateButton( ShowGUIInGerman() ? 'Ende' : 'Exit' , $txtxpos , $txtypos , $btnwidth , $btnheight )
  2051. GUICtrlSetResizing( -1 , $GUI_DOCKRIGHT + $GUI_DOCKBOTTOM )
  2052.  
  2053. ; GUI message loop
  2054. GUISetState()
  2055. If IsUNCPath( @ScriptDir ) Then
  2056.     If ShowGUIInGerman() Then
  2057.         $sMsgBoxTitle = 'Fehler'
  2058.         $sMsgBoxText  = 'Das Skript wurde von einem UNC-Pfad gestartet.' & @LF & _
  2059.                              'Bitte weisen Sie der Netzwerkfreigabe einen Laufwerksbuchstaben zu.'
  2060.     Else
  2061.         $sMsgBoxTitle = 'Error'
  2062.         $sMsgBoxText  = 'The script was started from a UNC path.' & @LF & _
  2063.                              'Please map a drive letter to the network share.'
  2064.     EndIf
  2065.     MsgBox( 0x2010 , $sMsgBoxTitle , $sMsgBoxText )
  2066.     Exit(1)
  2067. EndIf
  2068. If NOT PathValid( @ScriptDir ) Then
  2069.     If ShowGUIInGerman() Then
  2070.         $sMsgBoxTitle = 'Fehler'
  2071.         $sMsgBoxText  = 'Der Skript-Pfad darf nicht mehr als ' & $path_max_length & ' Zeichen lang sein und' & @LF & _
  2072.                              'darf keines der folgenden Zeichen enthalten: ' & $path_invalid_chars
  2073.     Else
  2074.         $sMsgBoxTitle = 'Error'
  2075.         $sMsgBoxText  = 'The script path must not be more than ' & $path_max_length & ' characters long and' & @LF & _
  2076.                              'must not contain any of the following characters: ' & $path_invalid_chars
  2077.     EndIf
  2078.     MsgBox( 0x2010 , $sMsgBoxTitle , $sMsgBoxText )
  2079.     Exit(1)
  2080. EndIf
  2081. If NOT PathValid( @TempDir ) Then
  2082.     If ShowGUIInGerman() Then
  2083.         $sMsgBoxTitle = 'Fehler'
  2084.         $sMsgBoxText  = 'Der %TEMP%-Pfad darf nicht mehr als ' & $path_max_length & ' Zeichen lang sein und' & @LF & _
  2085.                              'darf keines der folgenden Zeichen enthalten: ' & $path_invalid_chars
  2086.     Else
  2087.         $sMsgBoxTitle = 'Error'
  2088.         $sMsgBoxText  = 'The %TEMP% path must not be more than ' & $path_max_length & ' characters long and' & @LF & _
  2089.                              'must not contain any of the following characters: ' & $path_invalid_chars
  2090.     EndIf
  2091.     MsgBox( 0x2010 , $sMsgBoxTitle , $sMsgBoxText )
  2092.     Exit(1)
  2093. EndIf
  2094. If StringRight( EnvGet( 'TEMP' ) , 1 ) = '\' Then
  2095.     If ShowGUIInGerman() Then
  2096.         $sMsgBoxTitle = 'Fehler'
  2097.         $sMsgBoxText  = 'Der %TEMP%-Pfad enthält einen abschließenden Backslash "\".'
  2098.     Else
  2099.         $sMsgBoxTitle = 'Error'
  2100.         $sMsgBoxText  = 'The %TEMP% path contains a trailing backslash "\".'
  2101.     EndIf
  2102.     MsgBox( 0x2010 , $sMsgBoxTitle , $sMsgBoxText )
  2103.     Exit(1)
  2104. EndIf
  2105. If NOT DirectoryStructureExists() Then
  2106.     If ShowGUIInGerman() Then
  2107.         $sMsgBoxTitle = 'Fehler'
  2108.         $sMsgBoxText  = 'Die Verzeichnisstruktur ist unvollständig.' & @LF & _
  2109.                              'Bitte behalten Sie diese beim Entpacken des Zip-Archivs bei.'
  2110.     Else
  2111.         $sMsgBoxTitle = 'Error'
  2112.         $sMsgBoxText  = 'The directory structure is incomplete.' & @LF & _
  2113.                              'Please keep it when you unpack the Zip archive.'
  2114.     EndIf
  2115.     MsgBox( 0x2010 , $sMsgBoxTitle , $sMsgBoxText )
  2116.     Exit(1)
  2117. EndIf
  2118. While 1
  2119.     Switch GUIGetMsg()
  2120.         ; Window Closed
  2121.         Case $GUI_EVENT_CLOSE
  2122.             ExitLoop
  2123.  
  2124.         ; Exit Button Pressed
  2125.         Case $btn_exit
  2126.             ExitLoop
  2127.  
  2128.         ; 'Include Service Packs' Check Box Toggled
  2129.         Case $includesp
  2130.             If NOT IsCheckBoxChecked( $includesp ) AND IniRead( $inifilename , $ini_section_opts , $opts_token_cleanup , $enabled ) = $enabled Then
  2131.                 If ShowGUIInGerman() Then
  2132.                     $sMsgBoxTitle = 'Warnung'
  2133.                     $sMsgBoxText  = 'Durch die Option "Service-Packs ausschließen" werden bereits'           & @LF & _
  2134.                                          'heruntergeladene Service Packs für die selektierten Produkte gelöscht.' & @LF & _
  2135.                                          'Möchten Sie fortsetzen?'
  2136.                 Else
  2137.                     $sMsgBoxTitle = 'Warning'
  2138.                     $sMsgBoxText  = 'The option "Exclude Service Packs" will delete previously' & @LF & _
  2139.                                          'downloaded Service Packs for the selected products.'       & @LF & _
  2140.                                          'Do you wish to proceed?'
  2141.                 EndIf  
  2142.                 If MsgBox( 0x2134 , $sMsgBoxTitle , $sMsgBoxText ) = $msgbox_btn_no Then GUICtrlSetState( $includesp , $GUI_CHECKED )
  2143.             EndIf
  2144.  
  2145.         ; CD ISO Image Button Pressed
  2146.         Case $cdiso
  2147.             If IsCheckBoxChecked( $cdiso ) OR IsCheckBoxChecked( $dvdiso ) OR IsCheckBoxChecked( $usbcopy ) Then
  2148.                 GUICtrlSetState( $imageonly , $GUI_ENABLE )
  2149.             Else
  2150.                 GUICtrlSetState( $imageonly , $GUI_UNCHECKED + $GUI_DISABLE )
  2151.                 If IniRead( $inifilename , $ini_section_misc , $misc_token_skipdownload , $disabled ) = $disabled Then
  2152.                     GUICtrlSetState( $verifydownloads , $GUI_ENABLE )
  2153.                     GUICtrlSetState( $shutdown , $GUI_ENABLE )
  2154.                 EndIf
  2155.             EndIf
  2156.  
  2157.         ; DVD ISO Image Button Pressed
  2158.         Case $dvdiso
  2159.             If IsCheckBoxChecked( $cdiso ) OR IsCheckBoxChecked( $dvdiso ) OR IsCheckBoxChecked( $usbcopy ) Then
  2160.                 GUICtrlSetState( $imageonly , $GUI_ENABLE )
  2161.             Else
  2162.                 GUICtrlSetState( $imageonly , $GUI_UNCHECKED + $GUI_DISABLE )
  2163.                 If IniRead( $inifilename , $ini_section_misc , $misc_token_skipdownload , $disabled ) = $disabled Then
  2164.                     GUICtrlSetState( $verifydownloads , $GUI_ENABLE )
  2165.                     GUICtrlSetState( $shutdown , $GUI_ENABLE )
  2166.                 EndIf
  2167.             EndIf
  2168.  
  2169.         ; USB Copy Button Pressed
  2170.         Case $usbcopy
  2171.             If IsCheckBoxChecked( $usbcopy ) Then
  2172.                 GUICtrlSetState( $usbpath  , $GUI_ENABLE )
  2173.                 GUICtrlSetState( $usbfsf   , $GUI_ENABLE )
  2174.                 GUICtrlSetState( $usbclean , $GUI_ENABLE )
  2175.             Else
  2176.                 GUICtrlSetState( $usbpath  , $GUI_DISABLE )
  2177.                 GUICtrlSetState( $usbfsf   , $GUI_DISABLE )
  2178.                 GUICtrlSetState( $usbclean , $GUI_DISABLE )
  2179.             EndIf
  2180.             If IsCheckBoxChecked( $cdiso ) OR IsCheckBoxChecked( $dvdiso ) OR IsCheckBoxChecked( $usbcopy ) Then
  2181.                 GUICtrlSetState( $imageonly , $GUI_ENABLE )
  2182.             Else
  2183.                 GUICtrlSetState( $imageonly , $GUI_UNCHECKED + $GUI_DISABLE )
  2184.                 If IniRead( $inifilename , $ini_section_misc , $misc_token_skipdownload , $disabled ) = $disabled Then
  2185.                     GUICtrlSetState( $verifydownloads , $GUI_ENABLE )
  2186.                     GUICtrlSetState( $shutdown , $GUI_ENABLE )
  2187.                 EndIf
  2188.             EndIf
  2189.  
  2190.         ; FSF Button Pressed
  2191.         Case $usbfsf
  2192.             If ShowGUIInGerman() Then
  2193.                 $FileSelectText = 'Wählen Sie das Zielverzeichnis:'
  2194.             Else
  2195.                 $FileSelectText = 'Choose target directory:'
  2196.             EndIf
  2197.             $dummy = FileSelectFolder( $FileSelectText , '' , 1 , GUICtrlRead( $usbpath ))
  2198.             If FileExists( $dummy ) Then GUICtrlSetData( $usbpath , $dummy )
  2199.  
  2200.         ; 'Clean up target directory' Check Box Toggled
  2201.         Case $usbclean
  2202.             If IsCheckBoxChecked( $usbclean ) Then
  2203.                 If ShowGUIInGerman() Then
  2204.                     $sMsgBoxTitle = 'Warnung'
  2205.                     $sMsgBoxText  = 'Durch die Option "Zielverzeichnis bereinigen"'      & @LF & _
  2206.                                          'werden dort bereits existierende Dateien gelöscht.' & @LF & _
  2207.                                          'Möchten Sie fortsetzen?'
  2208.                 Else
  2209.                     $sMsgBoxTitle = 'Warning'
  2210.                     $sMsgBoxText  = 'The option "Clean up target directory"' & @LF &  _
  2211.                                          'will delete existing files there.'      & @LF & _
  2212.                                          'Do you wish to proceed?'
  2213.                 EndIf
  2214.                 If MsgBox( 0x2134 , $sMsgBoxTitle , $sMsgBoxText ) = $msgbox_btn_no Then GUICtrlSetState( $usbclean , $GUI_UNCHECKED )
  2215.             EndIf
  2216.  
  2217.         ; Image Only Checkbox Toggled
  2218.         Case $imageonly
  2219.             If IsCheckBoxChecked( $imageonly ) Then
  2220.                 If ShowGUIInGerman() Then
  2221.                     $sMsgBoxTitle = 'Warnung'
  2222.                     $sMsgBoxText  = 'Durch diese Option verhindern Sie das Herunterladen aktueller Updates.' & @LF & _
  2223.                                          'Dies kann ein erhöhtes Sicherheitsrisiko für das Zielsystem bedeuten.'  & @LF & _
  2224.                                          'Möchten Sie fortsetzen?'
  2225.                 Else
  2226.                     $sMsgBoxTitle = 'Warning'
  2227.                     $sMsgBoxText  = 'This option prevents downloading of recent updates.'     & @LF & _
  2228.                                          'This may increase security risks for the target system.' & @LF & _
  2229.                                          'Do you wish to proceed?'
  2230.                 EndIf
  2231.                 If MsgBox( 0x2134 , $sMsgBoxTitle , $sMsgBoxText ) = $msgbox_btn_no Then
  2232.                     GUICtrlSetState( $imageonly , $GUI_UNCHECKED )
  2233.                 Else
  2234.                     GUICtrlSetState( $verifydownloads , $GUI_DISABLE )
  2235.                     GUICtrlSetState( $shutdown , $GUI_UNCHECKED + $GUI_DISABLE )
  2236.                 EndIf
  2237.             Else
  2238.                 If IniRead( $inifilename , $ini_section_misc , $misc_token_skipdownload , $disabled ) = $disabled Then
  2239.                     GUICtrlSetState( $verifydownloads , $GUI_ENABLE )
  2240.                     GUICtrlSetState( $shutdown , $GUI_ENABLE )
  2241.                 EndIf
  2242.             EndIf
  2243.  
  2244.         ; Proxy Button Pressed
  2245.         Case $btn_proxy
  2246.             If ShowGUIInGerman() Then
  2247.                 $sInputBoxTitle = 'HTTP-Proxy-Einstellung'
  2248.                 $sInputBoxText  = 'ACHTUNG: Sonderzeichen müssen hier gemäß RFC1738 codiert werden.'   & @LF & _
  2249.                                         'Um die Speicherung Ihres Passworts zu vermeiden,'                   & @LF & _
  2250.                                         'lassen Sie es hier bitte weg (http://Benutzername:@Server[:Port]).' & @LF & @LF & _
  2251.                                         'Bitte geben Sie Ihre HTTP-Proxy-URL ein'                            & @LF & _
  2252.                                         '(http://[Benutzername:[Passwort]@]Server[:Port]):'
  2253.             Else
  2254.                 $sInputBoxTitle = 'HTTP Proxy setting'
  2255.                 $sInputBoxText  = 'NOTE: Special characters have to be encoded according to RFC1738 here.' & @LF & _
  2256.                                         'To avoid storage of your password, please omit it here' & @LF & _
  2257.                                         '(http://username:@server[:port]).'                      & @LF & @LF & _
  2258.                                         'Please enter your HTTP Proxy URL'                       & @LF & _
  2259.                                         '(http://[username:[password]@]server[:port]):'
  2260.             EndIf
  2261.             $dummy = InputBox( $sInputBoxTitle , $sInputBoxText , $proxy , '' , 420 )
  2262.             If @error = 0 AND $proxy <> $dummy Then
  2263.                 $proxy = $dummy
  2264.                 $proxypwd = ""
  2265.             EndIf
  2266.  
  2267.         ; WSUS Button Pressed
  2268.         Case $btn_wsus
  2269.             If ShowGUIInGerman() Then
  2270.                 $sInputBoxTitle = 'WSUS-Einstellung'
  2271.                 $sInputBoxText  = 'Bitte geben Sie Ihre WSUS-URL ein' & @LF & '(http://server):'
  2272.             Else
  2273.                 $sInputBoxTitle = 'WSUS setting'
  2274.                 $sInputBoxText  = 'Please enter your WSUS URL' & @LF & '(http://server):'
  2275.             EndIf
  2276.             $dummy = InputBox( $sInputBoxTitle , $sInputBoxText , $wsus , '' , 220 )
  2277.             If @error = 0 Then
  2278.                 $wsus = $dummy
  2279.             EndIf
  2280.  
  2281.         ; Donate Button Pressed
  2282.         Case $btn_donate
  2283.             ShellExecute( $donationURL )
  2284.  
  2285.         ; Start Button Pressed
  2286.         Case $btn_start
  2287.             $runany = False
  2288.             If NOT IsCheckBoxChecked( $imageonly ) Then
  2289.                 If StringInStr( $proxy , ':@' ) > 0 AND $proxypwd = '' Then
  2290.                     If ShowGUIInGerman() Then
  2291.                         $sInputBoxTitle = 'HTTP-Proxy-Passwort'
  2292.                         $sInputBoxText  = 'ACHTUNG: Bitte codieren Sie Sonderzeichen hier nicht.' & @LF & _
  2293.                                                 'Dies geschieht automatisch.'                           & @LF & @LF & _
  2294.                                                 'Bitte geben Sie Ihr HTTP-Proxy-Passwort ein:'
  2295.                     Else
  2296.                         $sInputBoxTitle = 'HTTP Proxy password'
  2297.                         $sInputBoxText  = 'NOTE: Please do not encode special characters here.' & @LF & _
  2298.                                                 'This will be done automatically.'                    & @LF & @LF & _
  2299.                                                 'Please enter your HTTP Proxy password:'
  2300.                     EndIf
  2301.                     $dummy = InputBox( $sInputBoxTitle , $sInputBoxText , '' , '*' , 300 )
  2302.                     If @error = 0 Then
  2303.                         $proxypwd = RFC1738EncodedString( $dummy )
  2304.                     Else
  2305.                         ContinueLoop
  2306.                     EndIf
  2307.                 EndIf
  2308.                 If IniRead( $inifilename , $ini_section_misc , $misc_token_chkver , $enabled ) = $enabled Then
  2309.                     Switch RunVersionCheck( AuthProxy( $proxy , $proxypwd ))
  2310.                         ; Yes
  2311.                         Case -1
  2312.                             RunSelfUpdate( AuthProxy( $proxy , $proxypwd ))
  2313.                             ExitLoop
  2314.  
  2315.                         ; Cancel / Close
  2316.                         Case 1
  2317.                             ContinueLoop
  2318.                     EndSwitch
  2319.                 EndIf
  2320.             EndIf
  2321.         If IniRead( $inifilename , $ini_section_misc , $misc_token_wsus_trans , $disabled ) = $enabled AND $wsus <> '' Then
  2322.             IniWrite( ClientIniFileName() , $ini_section_misc , $misc_token_clt_wustat , $wsus )
  2323.         Else
  2324.             IniDelete( ClientIniFileName() , $ini_section_misc , $misc_token_clt_wustat )
  2325.         EndIf
  2326.         If IniRead( $inifilename , $ini_section_misc , $misc_token_minimize , $disabled ) = $enabled Then
  2327.             WinSetState( $maindlg , $maindlg , @SW_MINIMIZE )
  2328.         EndIf
  2329.  
  2330.             ; Windows
  2331.             $sExempt = 'ell|ara|heb|dan|nor|fin'
  2332.             For $ii = 1 To $aMainArray[0][0]
  2333.                 If $aMainArray[$ii][1] <> '' Then
  2334.                     $aSplit = StringSplit( $aMainArray[$ii][1] , '|' )
  2335.                     For $jj = 1 To $aSplit[0]
  2336.                         If StringInStr( $aSplit[$jj] , 'w2k3' ) > 0 Then
  2337.                             If StringInStr( $sExempt , $aMainArray[$ii][0] ) > 0 Then ContinueLoop
  2338.                         EndIf
  2339.                         $sCurrentVar1 = StringReplace( $aSplit[$jj] & ' ' & $aMainArray[$ii][0] , ' ' , '_' )
  2340.                         $sCurrentVar2 = StringReplace( $aSplit[$jj] , ' ' , '-' ) & ' ' & $aMainArray[$ii][0]
  2341.                         If IsCheckBoxChecked( Eval( $sCurrentVar1 )) Then
  2342.                             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
  2343.                                 ContinueLoop 3
  2344.                             EndIf
  2345.                         EndIf
  2346.                     Next
  2347.                 EndIf
  2348.             Next
  2349.  
  2350.             ; Office Global
  2351.             If IsLangOfficeChecked() Then
  2352.                 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
  2353.                     ContinueLoop
  2354.                 EndIf
  2355.             EndIf
  2356.  
  2357.             ; Office
  2358.             For $ii = 1 To $aMainArray[0][0]
  2359.                 If $aMainArray[$ii][2] <> '' Then
  2360.                     $aSplit = StringSplit( $aMainArray[$ii][2] , '|' )
  2361.                     For $jj = 1 To $aSplit[0]
  2362.                         $sCurrentVar = StringReplace( $aSplit[$jj] & ' ' & $aMainArray[$ii][0] , ' ' , '_' )
  2363.                         If IsCheckBoxChecked( Eval( $sCurrentVar )) Then
  2364.                             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
  2365.                                 ContinueLoop 3
  2366.                             EndIf
  2367.                         EndIf
  2368.                     Next
  2369.                 EndIf
  2370.             Next
  2371.  
  2372.             ; Office Language Specific
  2373.             For $ii = 1 To $aMainArray[0][0]
  2374.                 If $aMainArray[$ii][2] <> '' Then
  2375.                     $aSplit = StringSplit( $aMainArray[$ii][2] , '|' )
  2376.                     For $jj = 1 To $aSplit[0]
  2377.                         $sCurrentVal = StringReplace( $aSplit[$jj] & ' ' & $aMainArray[$ii][0] , ' ' , '_' )
  2378.                         If IsCheckBoxChecked( Eval( $sCurrentVal )) Then
  2379.                             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
  2380.                                 ContinueLoop 3
  2381.                             EndIf
  2382.                         EndIf
  2383.                     Next
  2384.                 EndIf
  2385.             Next
  2386.  
  2387.             ; Create cross-platform DVD ISO images
  2388.             If IsCheckBoxChecked( $dvdiso ) Then
  2389.                 ; Windows Server 2003
  2390.                 For $ii = 1 To $aMainArray[0][0]
  2391.                     If StringInStr( $aMainArray[$ii][1] , 'w2k3' ) = 0 Then ContinueLoop
  2392.                     If IsCheckBoxChecked( Eval( 'w2k3_' & $aMainArray[$ii][0] )) Then
  2393.                         If RunISOCreationScript( Eval( 'lang_token_' & $aMainArray[$ii][0] ) , DetermineISOSwitches( $includesp , $dotnet , $wle , $msse , $wddefs , $usbclean )) <> 0 Then
  2394.                             ContinueLoop 2
  2395.                         EndIf
  2396.                     EndIf
  2397.                 Next
  2398.                 ; Office
  2399.                 For $ii = 1 To $aMainArray[0][0]
  2400.                     If $aMainArray[$ii][2] <> '' Then
  2401.                         $aSplit = StringSplit( $aMainArray[$ii][2] , '|' )
  2402.                         For $jj = 1 To $aSplit[0]
  2403.                             $sCurrentVal = StringReplace( $aSplit[$jj] & ' ' & $aMainArray[$ii][0] , ' ' , '_' )
  2404.                             If IsCheckBoxChecked( Eval( $sCurrentVal )) Then
  2405.                                 If RunISOCreationScript( Eval( 'lang_token_' & $aMainArray[$ii][0] ) , DetermineISOSwitches( $includesp , $dotnet , $wle , $msse , $wddefs , $usbclean )) <> 0 Then
  2406.                                     ContinueLoop 3
  2407.                                 EndIf
  2408.                             EndIf
  2409.                         Next
  2410.                     EndIf
  2411.                 Next
  2412.             EndIf
  2413.  
  2414.             ; Restore Window And Show Success Dialog
  2415.             WinSetState( $maindlg , $maindlg , @SW_RESTORE )
  2416.             If $runany Then
  2417.                 If IsCheckBoxChecked( $scripting ) Then
  2418.                     If ShowGUIInGerman() Then
  2419.                         $sMsgBoxTitle = 'Info'
  2420.                         $sMsgBoxText  = 'Sammelskript "' & @ScriptDir & '\cmd\custom\RunAll.cmd" erstellt.' & @LF & _
  2421.                                              'Möchten Sie das Skript nun prüfen?'
  2422.                     Else
  2423.                         $sMsgBoxTitle = 'Info'
  2424.                         $sMsgBoxText  = 'Collection script "' & @ScriptDir & '\cmd\custom\RunAll.cmd" created.' & @LF & _
  2425.                                              'Would you like to check the script now?'
  2426.                     EndIf
  2427.                     If MsgBox( 0x2044 , $sMsgBoxTitle , $sMsgBoxText ) = $msgbox_btn_yes Then ShowRunAll()
  2428.                 Else
  2429.                     If IsCheckBoxChecked( $shutdown ) Then
  2430.                         Run( @SystemDir & '\shutdown.exe /s /f /t 5' , '' , @SW_HIDE )
  2431.                         ExitLoop
  2432.                     EndIf
  2433.                     If IsCheckBoxChecked( $imageonly ) Then
  2434.                         If ShowGUIInGerman() Then
  2435.                             $sMsgBoxTitle = 'Info'
  2436.                             $sMsgBoxText  = 'Image-Erstellung / Kopieren erfolgreich.'
  2437.                         Else
  2438.                             $sMsgBoxTitle = 'Info'
  2439.                             $sMsgBoxText  = 'Image creation / copying successful.'
  2440.                         EndIf
  2441.                         MsgBox( 0x2040 , $sMsgBoxTitle , $sMsgBoxText )
  2442.                     Else
  2443.                         If ShowGUIInGerman() Then
  2444.                             $sMsgBoxTitle = 'Info'
  2445.                             $sMsgBoxText  = 'Herunterladen / Image-Erstellung / Kopieren erfolgreich.' & @LF & _
  2446.                                                  'Möchten Sie nun die Protokolldatei auf mögliche Warnungen prüfen?'
  2447.                         Else
  2448.                             $sMsgBoxTitle = 'Info'
  2449.                             $sMsgBoxText  = 'Download / image creation / copying successful.' & @LF & _
  2450.                                                  'Would you like to check the log file for possible warnings now?'
  2451.                         EndIf
  2452.                         If MsgBox( 0x2044 , $sMsgBoxTitle , $sMsgBoxText ) = $msgbox_btn_yes Then ShowLogFile()
  2453.                     EndIf
  2454.                 EndIf
  2455.             Else
  2456.                 If ShowGUIInGerman() Then
  2457.                     $sMsgBoxTitle = 'Info'
  2458.                     $sMsgBoxText  = 'Nichts zu tun!'
  2459.                 Else
  2460.                     $sMsgBoxTitle = 'Info'
  2461.                     $sMsgBoxText  = 'Nothing to do!'
  2462.                 EndIf
  2463.                 MsgBox( 0x2040 , $sMsgBoxTitle , $sMsgBoxText )
  2464.             EndIf
  2465.  
  2466.     EndSwitch
  2467. WEnd
  2468. SaveSettings()
  2469. Exit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement