Advertisement
Nologic

WSUS Offline Update Rev 4

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