Advertisement
Nologic

WSUS Offline Update Rev 3

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