Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; *** WSUS Offline Update 9.7 - Generator ***
- ; *** Author: T. Wittrock, Kiel ***
- ; *** USB-Option added by Ch. Riedel ***
- ; *** Dialog scaling added by Th. Baisch ***
- #include <GUIConstants.au3>
- #include <Array.au3>
- #pragma compile( CompanyName , 'T. Wittrock' )
- #pragma compile( FileDescription , 'WSUS Offline Update Generator' )
- #pragma compile( FileVersion , 9.7.0.669 )
- #pragma compile( InternalName , 'Generator' )
- #pragma compile( LegalCopyright , 'GNU GPLv3' )
- #pragma compile( OriginalFilename , UpdateGenerator.exe )
- #pragma compile( ProductName , 'WSUS Offline Update' )
- #pragma compile( ProductVersion , 9.7.0 )
- AutoItSetOption( 'GUICloseOnESC' , 0 )
- AutoItSetOption( 'TrayAutoPause' , 0 )
- AutoItSetOption( 'TrayIconHide' , 1 )
- Const $caption = 'WSUS Offline Update 9.7'
- Const $title = $caption & ' - Generator'
- Const $donationURL = 'http://www.wsusoffline.net/donate.html'
- Const $downloadLogFile = 'download.log'
- Const $runAllFile = 'RunAll.cmd'
- ; Registry Constants
- Const $reg_key_hkcu_desktop = 'HKEY_CURRENT_USER\Control Panel\Desktop'
- Const $reg_key_hkcu_winmetrics = 'HKEY_CURRENT_USER\Control Panel\Desktop\WindowMetrics'
- Const $reg_val_logpixels = 'LogPixels'
- Const $reg_val_applieddpi = 'AppliedDPI'
- ; Message Box Return Codes
- Const $msgbox_btn_ok = 1
- Const $msgbox_btn_cancel = 2
- Const $msgbox_btn_abort = 3
- Const $msgbox_btn_retry = 4
- Const $msgbox_btn_ignore = 5
- Const $msgbox_btn_yes = 6
- Const $msgbox_btn_no = 7
- Const $msgbox_btn_tryagain = 10
- Const $msgbox_btn_continue = 11
- ; Defaults
- Const $default_logpixels = 96
- ; INI file Constants
- Const $ini_section_w2k3 = "Windows Server 2003"
- Const $ini_section_w2k3_x64 = "Windows Server 2003 x64"
- Const $ini_section_w60 = "Windows Vista"
- Const $ini_section_w60_x64 = "Windows Vista x64"
- Const $ini_section_w61 = "Windows 7"
- Const $ini_section_w61_x64 = "Windows Server 2008 R2"
- Const $ini_section_w62 = "Windows 8"
- Const $ini_section_w62_x64 = "Windows Server 2012"
- Const $ini_section_w63 = "Windows 8.1"
- Const $ini_section_w63_x64 = "Windows Server 2012 R2"
- Const $ini_section_o2k7 = "Office 2007"
- Const $ini_section_o2k10 = "Office 2010"
- Const $ini_section_o2k13 = "Office 2013"
- Const $ini_section_iso = "ISO Images"
- Const $ini_section_usb = "USB Images"
- Const $ini_section_opts = "Options"
- Const $ini_section_misc = "Miscellaneous"
- Const $enabled = "Enabled"
- Const $disabled = "Disabled"
- Const $iso_token_cd = "single"
- Const $iso_token_dvd = "cross-platform"
- Const $iso_token_skiphashes = "skiphashes"
- Const $usb_token_copy = "copy"
- Const $usb_token_path = "path"
- Const $usb_token_cleanup = "cleanup"
- Const $opts_token_includesp = "includesp"
- Const $opts_token_allowsp = "allowsp"
- Const $opts_token_includedotnet = "includedotnet"
- Const $opts_token_allowdotnet = "allowdotnet"
- Const $opts_token_wle = "includewle"
- Const $opts_token_msse = "includemsse"
- Const $opts_token_wddefs = "includewddefs"
- Const $opts_token_cleanup = "cleanupdownloads"
- Const $opts_token_verify = "verifydownloads"
- Const $misc_token_proxy = "proxy"
- Const $misc_token_wsus = "wsus"
- Const $misc_token_wsus_only = "wsusonly"
- Const $misc_token_wsus_proxy = "wsusbyproxy"
- Const $misc_token_wsus_trans = "transferwsus"
- Const $misc_token_skipsdd = "skipsdd"
- Const $misc_token_skiptz = "skiptz"
- Const $misc_token_skipdownload = "skipdownload"
- Const $misc_token_skipdynamic = "skipdynamic"
- Const $misc_token_chkver = "checkouversion"
- Const $misc_token_minimize = "minimizeondownload"
- Const $misc_token_showshutdown = "showshutdown"
- Const $misc_token_showdonate = "showdonate"
- Const $misc_token_clt_wustat = "WUStatusServer"
- ; Paths
- Const $path_max_length = 192
- Const $path_invalid_chars = '!%&()^+,;='
- Const $paths_rel_structure = '\bin\,\client\bin\,\client\cmd\,\client\exclude\,\client\opt\,\client\static\,\cmd\,\exclude\,\iso\,\log\,\static\,\xslt\'
- Const $path_rel_builddate = '\client\builddate.txt'
- Const $path_rel_clientini = '\client\UpdateInstaller.ini'
- Const $path_rel_win_glb = '\client\win\glb'
- Dim $maindlg , $inifilename , $tabitemfocused , $includesp , $dotnet , $wle , $msse , $wddefs , $verifydownloads , $cdiso , $dvdiso , $buildlbl
- Dim $usbcopy , $usbpath , $usbfsf , $usbclean , $imageonly , $scripting , $shutdown , $btn_start , $btn_proxy , $btn_wsus , $btn_donate , $btn_exit , $proxy , $proxypwd , $wsus , $dummy
- Dim $dlgheight , $groupwidth , $groupheight_lng , $groupheight_glb , $txtwidth , $txtheight , $slimheight , $btnwidth , $btnheight , $txtxoffset , $txtyoffset , $txtxpos , $txtypos , $runany
- Global Const $aMainArray[26][5] = [ [ 25 , 'Windows' , 'Office' , 'Deutsch' , 'English' ] , _
- ['glb' , 'w60|w60 x64|w61|w61 x64|w62|w62 x64|w63|w63 x64' ] , _
- ['enu' , 'w2k3|w2k3 x64', 'o2k7|o2k10|o2k13' , 'Englisch' , 'English' ] , _
- ['fra' , 'w2k3|w2k3 x64', 'o2k7|o2k10|o2k13' , 'Französisch' , 'French' ] , _
- ['esn' , 'w2k3|w2k3 x64', 'o2k7|o2k10|o2k13' , 'Spanisch' , 'Spanish' ] , _
- ['jpn' , 'w2k3|w2k3 x64', 'o2k7|o2k10|o2k13' , 'Japanisch' , 'Japanese' ] , _
- ['kor' , 'w2k3|w2k3 x64', 'o2k7|o2k10|o2k13' , 'Koreanisch' , 'Korean' ] , _
- ['rus' , 'w2k3|w2k3 x64', 'o2k7|o2k10|o2k13' , 'Russisch' , 'Russian' ] , _
- ['ptg' , 'w2k3' , 'o2k7|o2k10|o2k13' , 'Portugiesisch' , 'Portuguese' ] , _
- ['ptb' , 'w2k3|w2k3 x64', 'o2k7|o2k10|o2k13' , 'Brasilianisch' , 'Brazilian' ] , _
- ['deu' , 'w2k3|w2k3 x64', 'o2k7|o2k10|o2k13' , 'Deutsch' , 'German' ] , _
- ['nld' , 'w2k3' , 'o2k7|o2k10|o2k13' , 'Niederländisch' , 'Dutch' ] , _
- ['ita' , 'w2k3' , 'o2k7|o2k10|o2k13' , 'Italienisch' , 'Italian' ] , _
- ['chs' , 'w2k3' , 'o2k7|o2k10|o2k13' , 'Chin. (simpl.)' , 'Chinese (s.)' ] , _
- ['cht' , 'w2k3' , 'o2k7|o2k10|o2k13' , 'Chin. (trad.)' , 'Chinese (tr.)'] , _
- ['plk' , 'w2k3' , 'o2k7|o2k10|o2k13' , 'Polnisch' , 'Polish' ] , _
- ['hun' , 'w2k3' , 'o2k7|o2k10|o2k13' , 'Ungarisch' , 'Hungarian' ] , _
- ['csy' , 'w2k3' , 'o2k7|o2k10|o2k13' , 'Tschechisch' , 'Czech' ] , _
- ['sve' , 'w2k3' , 'o2k7|o2k10|o2k13' , 'Schwedisch' , 'Swedish' ] , _
- ['trk' , 'w2k3' , 'o2k7|o2k10|o2k13' , 'Türkisch' , 'Turkish' ] , _
- ['ell' , 'w2k3' , 'o2k7|o2k10|o2k13' , 'Griechisch' , 'Greek' ] , _
- ['ara' , 'w2k3' , 'o2k7|o2k10|o2k13' , 'Arabisch' , 'Arabic' ] , _
- ['heb' , 'w2k3' , 'o2k7|o2k10|o2k13' , 'Hebräisch' , 'Hebrew' ] , _
- ['dan' , 'w2k3' , 'o2k7|o2k10|o2k13' , 'Dänisch' , 'Danish' ] , _
- ['nor' , 'w2k3' , 'o2k7|o2k10|o2k13' , 'Norwegisch' , 'Norwegian' ] , _
- ['fin' , 'w2k3' , 'o2k7|o2k10|o2k13' , 'Finnisch' , 'Finnish' ] ]
- ; Create Language Tokens ex. $lang_token_glb
- For $ii = 1 To $aMainArray[0][0]
- If $aMainArray[$ii][0] <> '' Then
- Assign( 'lang_token_' & $aMainArray[$ii][0] , $aMainArray[$ii][0] , 2 )
- EndIf
- Next
- Func ShowGUIInGerman()
- If $CmdLine[0] > 0 Then
- If StringLower( $CmdLine[1] ) = 'deu' Then
- Return True
- Else
- Return False
- EndIf
- EndIf
- Return StringInStr( '0007|0407|0807|0C07|1007|1407' , @OSLang ) > 0
- EndFunc
- Func IsUNCPath( $path )
- Return StringInStr( $path , '\\' ) > 0
- EndFunc
- Func PathValid( $path )
- Local $result , $arr_invalid , $ii
- If StringLen( $path ) > $path_max_length Then
- $result = False
- Else
- $result = True
- $arr_invalid = StringSplit( $path_invalid_chars , '' )
- For $ii = 1 to $arr_invalid[0]
- If StringInStr( $path , $arr_invalid[$ii] ) > 0 Then
- $result = False
- ExitLoop
- EndIf
- Next
- EndIf
- Return $result
- EndFunc
- Func DirectoryStructureExists()
- Local $result = True , $arr_dirs , $ii
- $arr_dirs = StringSplit( $paths_rel_structure , ',' )
- For $ii = 1 to $arr_dirs[0]
- $result = $result AND FileExists( @ScriptDir & $arr_dirs[$ii] )
- Next
- Return $result
- EndFunc
- Func LastDownloadRun()
- Local $result = FileReadLine( @ScriptDir & $path_rel_builddate )
- If @error Then $result = ShowGUIInGerman() ? '[Kein]' : '[None]'
- Return $result
- EndFunc
- Func ClientIniFileName()
- Return @ScriptDir & $path_rel_clientini
- EndFunc
- Func LanguageCaption( $token , $german )
- Local $iFind = _ArraySearch( $aMainArray , $token , 1 , 0 , 0 , 0 , 1 , 0 )
- If $iFind = -1 Then
- Return ''
- Else
- If $german Then
- Return $aMainArray[$iFind][3]
- Else
- Return $aMainArray[$iFind][4]
- EndIf
- EndIf
- EndFunc
- Func IsCheckBoxChecked( $chkbox )
- Return BitAND( GUICtrlRead( $chkbox ) , $GUI_CHECKED ) = $GUI_CHECKED
- EndFunc
- Func CheckBoxStateToString( $chkbox )
- If IsCheckBoxChecked( $chkbox ) Then
- Return $enabled
- Else
- Return $disabled
- EndIf
- EndFunc
- Func IsLangOfficeChecked()
- Local $aOffChkSplit , $ii , $jj
- For $ii = 1 To $aMainArray[0][0]
- If $aMainArray[$ii][2] <> '' Then
- $aOffChkSplit = StringSplit( $aMainArray[$ii][2] , '|' )
- For $jj = 1 To $aOffChkSplit[0]
- $sCurrentVar = StringReplace( $aOffChkSplit[$jj] & ' ' & $aMainArray[$ii][0] , ' ' , '_' )
- If IsCheckBoxChecked( Eval( $sCurrentVar )) Then
- Return True
- EndIf
- Next
- EndIf
- Next
- EndFunc
- Func SwitchDownloadTargets( $state )
- Local $aWinDwnSplit , $aOffDwnSplit
- Local $sCurrentVar , $ii , $jj
- ; Windows
- For $ii = 1 To $aMainArray[0][0]
- If StringInStr( 'ell|ara|heb|dan|nor|fin' , $aMainArray[$ii][0] ) > 0 Then ContinueLoop
- If $aMainArray[$ii][1] <> '' Then
- $aWinDwnSplit = StringSplit( $aMainArray[$ii][1] , '|' )
- For $jj = 1 To $aWinDwnSplit[0]
- $sCurrentVar = StringReplace( $aWinDwnSplit[$jj] & ' ' & $aMainArray[$ii][0] , ' ' , '_' )
- GUICtrlSetState( Eval( $sCurrentVar ) , $state )
- Next
- EndIf
- Next
- ; Office
- For $ii = 1 To $aMainArray[0][0]
- If $aMainArray[$ii][2] <> '' Then
- $aOffDwnSplit = StringSplit( $aMainArray[$ii][2] , '|' )
- For $jj = 1 To $aOffDwnSplit[0]
- $sCurrentVar = StringReplace( $aOffDwnSplit[$jj] & ' ' & $aMainArray[$ii][0] , ' ' , '_' )
- GUICtrlSetState( Eval( $sCurrentVar ) , $state )
- Next
- EndIf
- Next
- Return 0
- EndFunc
- Func DisableGUI()
- SwitchDownloadTargets( $GUI_DISABLE )
- GUICtrlSetState( $verifydownloads , $GUI_DISABLE )
- GUICtrlSetState( $includesp , $GUI_DISABLE )
- GUICtrlSetState( $dotnet , $GUI_DISABLE )
- GUICtrlSetState( $wle , $GUI_DISABLE )
- GUICtrlSetState( $msse , $GUI_DISABLE )
- GUICtrlSetState( $wddefs , $GUI_DISABLE )
- GUICtrlSetState( $cdiso , $GUI_DISABLE )
- GUICtrlSetState( $dvdiso , $GUI_DISABLE )
- GUICtrlSetState( $usbcopy , $GUI_DISABLE )
- GUICtrlSetState( $usbpath , $GUI_DISABLE )
- GUICtrlSetState( $usbfsf , $GUI_DISABLE )
- GUICtrlSetState( $usbclean , $GUI_DISABLE )
- GUICtrlSetState( $btn_start , $GUI_DISABLE )
- GUICtrlSetState( $imageonly , $GUI_DISABLE )
- GUICtrlSetState( $scripting , $GUI_DISABLE )
- GUICtrlSetState( $shutdown , $GUI_DISABLE )
- GUICtrlSetState( $btn_proxy , $GUI_DISABLE )
- GUICtrlSetState( $btn_wsus , $GUI_DISABLE )
- GUICtrlSetState( $btn_donate , $GUI_DISABLE )
- GUICtrlSetState( $btn_exit , $GUI_DISABLE )
- Return 0
- EndFunc
- Func EnableGUI()
- SwitchDownloadTargets( $GUI_ENABLE )
- If IniRead( $inifilename , $ini_section_misc , $misc_token_skipdownload , $disabled ) = $disabled AND NOT IsCheckBoxChecked( $imageonly ) Then
- GUICtrlSetState( $verifydownloads , $GUI_ENABLE )
- EndIf
- GUICtrlSetState( $dotnet , $GUI_ENABLE )
- If IniRead( $inifilename , $ini_section_misc , $misc_token_skipdownload , $disabled ) = $disabled Then
- GUICtrlSetState( $includesp , $GUI_ENABLE )
- GUICtrlSetState( $wle , $GUI_ENABLE )
- GUICtrlSetState( $msse , $GUI_ENABLE )
- GUICtrlSetState( $wddefs , $GUI_ENABLE )
- GUICtrlSetState( $cdiso , $GUI_ENABLE )
- GUICtrlSetState( $dvdiso , $GUI_ENABLE )
- GUICtrlSetState( $usbcopy , $GUI_ENABLE )
- If IsCheckBoxChecked( $usbcopy ) Then
- GUICtrlSetState( $usbpath , $GUI_ENABLE )
- GUICtrlSetState( $usbfsf , $GUI_ENABLE )
- GUICtrlSetState( $usbclean , $GUI_ENABLE )
- EndIf
- EndIf
- GUICtrlSetState( $btn_start , $GUI_ENABLE )
- GUICtrlSetState( $scripting , $GUI_ENABLE )
- If IniRead( $inifilename , $ini_section_misc , $misc_token_skipdownload , $disabled ) = $disabled Then
- GUICtrlSetState( $imageonly , $GUI_ENABLE )
- If NOT IsCheckBoxChecked( $imageonly ) Then GUICtrlSetState( $shutdown , $GUI_ENABLE )
- EndIf
- GUICtrlSetState( $btn_proxy , $GUI_ENABLE )
- If IniRead( $inifilename , $ini_section_misc , $misc_token_skipdownload , $disabled ) = $disabled AND _
- IniRead( $inifilename , $ini_section_misc , $misc_token_skipdynamic , $disabled ) = $disabled Then
- GUICtrlSetState( $btn_wsus , $GUI_ENABLE )
- EndIf
- GUICtrlSetState( $btn_donate , $GUI_ENABLE )
- GUICtrlSetState( $btn_exit , $GUI_ENABLE )
- Return 0
- EndFunc
- Func RFC1738EncodedString( $str )
- Local $result , $ii
- For $ii = 1 to StringLen( $str )
- If StringIsAlNum( StringMid( $str , $ii , 1 )) Then
- $result &= StringMid( $str , $ii , 1 )
- Else
- $result &= '%' & Hex( Asc( StringMid( $str , $ii , 1 )) , 2 )
- EndIf
- Next
- Return $result
- EndFunc
- Func AuthProxy( $strproxy , $strproxypwd )
- Local $result = $strproxy
- Local $pos = StringInStr( $strproxy , ':@' )
- If $pos > 0 AND $strproxypwd <> '' Then
- $result = StringLeft( $strproxy , $pos ) & $strproxypwd & StringRight( $strproxy , StringLen( $strproxy ) - $pos )
- EndIf
- Return $result
- EndFunc
- Func DetermineDownloadSwitches( $chkbox_includesp , $chkbox_dotnet , $chkbox_wle , $chkbox_msse , $chkbox_wddefs , $chkbox_verifydownloads , $strproxy , $strwsus )
- Local $result
- If NOT IsCheckBoxChecked( $chkbox_includesp ) Then $result &= ' /excludesp'
- If IsCheckBoxChecked( $chkbox_dotnet ) Then $result &= ' /includedotnet'
- If IsCheckBoxChecked( $chkbox_wle ) Then $result &= ' /includewle'
- If IsCheckBoxChecked( $chkbox_msse ) Then $result &= ' /includemsse'
- If IsCheckBoxChecked( $chkbox_wddefs ) Then $result &= ' /includewddefs'
- If IsCheckBoxChecked( $chkbox_verifydownloads ) Then $result &= ' /verify'
- If NOT IsCheckBoxChecked( $scripting ) Then $result &= ' /exitonerror'
- If IniRead( $inifilename , $ini_section_opts , $opts_token_cleanup , $enabled ) = $disabled Then $result &= ' /nocleanup'
- If IniRead( $inifilename , $ini_section_misc , $misc_token_skipsdd , $disabled ) = $enabled Then $result &= ' /skipsdd'
- If IniRead( $inifilename , $ini_section_misc , $misc_token_skiptz , $disabled ) = $enabled Then $result &= ' /skiptz'
- If IniRead( $inifilename , $ini_section_misc , $misc_token_skipdownload , $disabled ) = $enabled Then
- $result &= ' /skipdownload'
- Else
- If IniRead( $inifilename , $ini_section_misc , $misc_token_skipdynamic , $disabled ) = $enabled Then $result &= ' /skipdynamic'
- EndIf
- If $strproxy <> '' Then $result &= ' /proxy ' & $strproxy
- If $strwsus <> '' Then $result &= ' /wsus ' & $strwsus
- If IniRead( $inifilename , $ini_section_misc , $misc_token_wsus_only , $disabled ) = $enabled Then $result &= ' /wsusonly'
- If IniRead( $inifilename , $ini_section_misc , $misc_token_wsus_proxy , $disabled ) = $enabled Then $result &= ' /wsusbyproxy'
- Return $result
- EndFunc
- Func DetermineISOSwitches( $chkbox_includesp , $chkbox_dotnet , $chkbox_wle , $chkbox_msse , $chkbox_wddefs , $chkbox_usbclean )
- Local $result
- If NOT IsCheckBoxChecked( $chkbox_includesp ) Then $result &= ' /excludesp'
- If IsCheckBoxChecked( $chkbox_dotnet ) Then $result &= ' /includedotnet'
- If IsCheckBoxChecked( $chkbox_wle ) Then $result &= ' /includewle'
- If IsCheckBoxChecked( $chkbox_msse ) Then $result &= ' /includemsse'
- If IsCheckBoxChecked( $chkbox_wddefs ) Then $result &= ' /includewddefs'
- If IsCheckBoxChecked( $chkbox_usbclean ) Then $result &= ' /cleanup'
- If NOT IsCheckBoxChecked( $scripting ) Then $result &= ' /exitonerror'
- If IniRead( $inifilename , $ini_section_iso , $iso_token_skiphashes , $disabled ) = $enabled Then $result &= ' /skiphashes'
- Return $result
- EndFunc
- Func ShowLogFile()
- Run( 'notepad.exe "' & @ScriptDir & '\log\' & $downloadLogFile & '"' )
- EndFunc
- Func ShowRunAll()
- Run( 'notepad.exe "' & @ScriptDir & '\cmd\custom\' & $runAllFile & '"' )
- EndFunc
- Func RunVersionCheck( $strproxy )
- Local $result
- DisableGUI()
- If $strproxy = '' Then
- $result = RunWait( @ComSpec & ' /D /C CheckOUVersion.cmd /exitonerror' , @ScriptDir & '\cmd\' , @SW_SHOWMINNOACTIVE )
- Else
- $result = RunWait( @ComSpec & ' /D /C CheckOUVersion.cmd /exitonerror /proxy ' & $strproxy , @ScriptDir & '\cmd\' , @SW_SHOWMINNOACTIVE )
- EndIf
- If $result = 0 Then $result = @error
- If $result <> 0 Then
- If ShowGUIInGerman() Then
- $sMsgBoxTitle = 'Versionsprüfung'
- $sMsgBoxText = 'Sie setzen ' & $caption & ' ein. Eine neuere Version ist verfügbar.' & @LF & _
- 'Möchten Sie WSUS Offline Update nun aktualisieren?'
- Else
- $sMsgBoxTitle = 'Version check'
- $sMsgBoxText = 'You are using ' & $caption & '. A newer version is available.' & @LF & _
- 'Would you like to update WSUS Offline Update now?'
- EndIf
- $result = MsgBox( 0x2023 , $sMsgBoxTitle , $sMsgBoxText )
- Switch $result
- Case $msgbox_btn_yes
- $result = -1
- Case $msgbox_btn_no
- $result = 0
- Case Else
- $result = 1
- EndSwitch
- EndIf
- EnableGUI()
- Return $result
- EndFunc
- Func RunSelfUpdate( $strproxy )
- If $strproxy = '' Then
- Run( @ComSpec & ' /D /C UpdateOU.cmd /restartgenerator' , @ScriptDir & '\cmd\' , @SW_SHOW )
- Else
- Run( @ComSpec & ' /D /C UpdateOU.cmd /restartgenerator /proxy ' & $strproxy , @ScriptDir & '\cmd\' , @SW_SHOW )
- EndIf
- Return 0
- EndFunc
- Func RunDownloadScript( $stroptions , $strswitches )
- Local $result
- If IsCheckBoxChecked( $scripting ) Then
- If $runany Then
- $result = FileOpen( @ScriptDir & '\cmd\custom\' & $runAllFile , 1 )
- Else
- $result = FileOpen( @ScriptDir & '\cmd\custom\' & $runAllFile , 2 )
- EndIf
- If $result = -1 Then
- If ShowGUIInGerman() Then
- $sMsgBoxTitle = 'Fehler'
- $sMsgBoxText = 'Fehler beim Öffnen der Datei "'
- Else
- $sMsgBoxTitle = 'Error'
- $sMsgBoxText = 'Error opening file "'
- EndIf
- MsgBox( 0x2010 , $sMsgBoxTitle , $sMsgBoxText & @ScriptDir & '\cmd\custom\' & $runAllFile & '".' )
- Return $result
- EndIf
- FileWrite( $result , '@pushd ..' & @CRLF & 'call .\DownloadUpdates.cmd ' & $stroptions & $strswitches & @CRLF & '@popd' )
- FileClose( $result )
- $runany = True
- Return 0
- EndIf
- WinSetTitle( $maindlg , $maindlg , $caption & ( ShowGUIInGerman() ? ' - Lade Updates für ' : ' - Downloading updates for ' ) & $stroptions & '...' )
- DisableGUI()
- If IniRead( $inifilename , $ini_section_misc , $misc_token_minimize , $disabled ) = $enabled Then
- $result = RunWait( @ComSpec & ' /D /C DownloadUpdates.cmd ' & $stroptions & $strswitches , @ScriptDir & '\cmd\' , @SW_SHOWMINNOACTIVE )
- Else
- $result = RunWait( @ComSpec & ' /D /C DownloadUpdates.cmd ' & $stroptions & $strswitches , @ScriptDir & '\cmd\' , @SW_SHOW )
- EndIf
- If $result = 0 Then $result = @error
- If $result = 0 Then
- $runany = True
- GUICtrlSetData( $buildlbl , ( ShowGUIInGerman() ? 'Letzter Download: ' : 'Last download: ' ) & LastDownloadRun())
- Else
- WinSetState( $maindlg , $maindlg , @SW_RESTORE )
- If ShowGUIInGerman() Then
- $sMsgBoxTitle = 'Fehler'
- $sMsgBoxText = 'Fehler beim Herunterladen / Verifizieren der Updates für ' & $stroptions & '.' & @LF & _
- 'Möchten Sie nun die Protokolldatei ansehen?'
- Else
- $sMsgBoxTitle = 'Error'
- $sMsgBoxText = 'Error downloading / verifying updates for ' & $stroptions & '.' & @LF & _
- 'Would you like to view the log file now?'
- EndIf
- If MsgBox( 0x2014 , $sMsgBoxTitle , $sMsgBoxText ) = $msgbox_btn_yes Then ShowLogFile()
- EndIf
- WinSetTitle( $maindlg , $maindlg , $title )
- EnableGUI()
- Return $result
- EndFunc
- Func RunISOCreationScript( $stroptions , $strswitches )
- Local $result
- If IsCheckBoxChecked( $scripting ) Then
- If $runany Then
- $result = FileOpen( @ScriptDir & '\cmd\custom\' & $runAllFile , 1 )
- Else
- $result = FileOpen( @ScriptDir & '\cmd\custom\' & $runAllFile , 2 )
- EndIf
- If $result = -1 Then
- If ShowGUIInGerman() Then
- $sMsgBoxTitle = 'Fehler'
- $sMsgBoxText = 'Fehler beim Öffnen der Datei "'
- Else
- $sMsgBoxTitle = 'Error'
- $sMsgBoxText = 'Error opening file "'
- EndIf
- MsgBox( 0x2010 , $sMsgBoxTitle , $sMsgBoxText & @ScriptDir & '\cmd\custom\' & $runAllFile & '".' )
- Return $result
- EndIf
- FileWrite( $result , '@pushd ..' & @CRLF & 'call .\CreateISOImage.cmd ' & $stroptions & $strswitches & @CRLF & '@popd' )
- FileClose( $result )
- $runany = True
- Return 0
- EndIf
- WinSetTitle( $maindlg , $maindlg , $caption & ( ShowGUIInGerman() ? ' - Erstelle ISO-Image für ' : ' - Creating ISO image for ' ) & $stroptions & '...' )
- DisableGUI()
- If IniRead( $inifilename , $ini_section_misc , $misc_token_minimize , $disabled ) = $enabled Then
- $result = RunWait( @ComSpec & ' /D /C CreateISOImage.cmd ' & $stroptions & $strswitches , @ScriptDir & '\cmd\' , @SW_SHOWMINNOACTIVE )
- Else
- $result = RunWait( @ComSpec & ' /D /C CreateISOImage.cmd ' & $stroptions & $strswitches , @ScriptDir & '\cmd\' , @SW_SHOW )
- EndIf
- If $result = 0 Then $result = @error
- If $result = 0 Then
- $runany = True
- Else
- WinSetState( $maindlg , $maindlg , @SW_RESTORE )
- If ShowGUIInGerman() Then
- $sMsgBoxTitle = 'Fehler'
- $sMsgBoxText = 'Fehler beim Erstellen des ISO-Images für ' & $stroptions & '.'
- Else
- $sMsgBoxTitle = 'Error'
- $sMsgBoxText = 'Error creating ISO image for ' & $stroptions & '.'
- EndIf
- MsgBox( 0x2014 , $sMsgBoxTitle , $sMsgBoxText )
- EndIf
- WinSetTitle( $maindlg , $maindlg , $title )
- EnableGUI()
- Return $result
- EndFunc
- Func RunUSBCreationScript( $stroptions , $strswitches , $strpath )
- Local $result , $sMsgBoxTitle , $sMsgBoxText
- If IsCheckBoxChecked( $scripting ) Then
- If $runany Then
- $result = FileOpen( @ScriptDir & '\cmd\custom\' & $runAllFile , 1 )
- Else
- $result = FileOpen( @ScriptDir & '\cmd\custom\' & $runAllFile , 2 )
- EndIf
- If $result = -1 Then
- If ShowGUIInGerman() Then
- $sMsgBoxTitle = 'Fehler'
- $sMsgBoxText = 'Fehler beim Öffnen der Datei "'
- Else
- $sMsgBoxTitle = 'Error'
- $sMsgBoxText = 'Error opening file "'
- EndIf
- MsgBox( 0x2010 , $sMsgBoxTitle , $sMsgBoxText & @ScriptDir & '\cmd\custom\' & $runAllFile & '".' )
- Return $result
- EndIf
- FileWrite( $result , '@pushd ..' & @CRLF & 'call .\CopyToTarget.cmd ' & $stroptions & ' "' & $strpath & '"' & $strswitches & @CRLF & '@popd' )
- FileClose( $result )
- $runany = True
- Return 0
- EndIf
- $result = 0
- If NOT FileExists( $strpath ) Then
- If ShowGUIInGerman() Then
- $sMsgBoxTitle = 'Warnung'
- $sMsgBoxText = 'Das Zielverzeichnis "' & $strpath & '" existiert nicht.'
- Else
- $sMsgBoxTitle = 'Warning'
- $sMsgBoxText = 'The target directory "' & $strpath & '" does not exist.'
- EndIf
- MsgBox( 0x2010 , $sMsgBoxTitle , $sMsgBoxText )
- Return $result
- EndIf
- WinSetTitle( $maindlg , $maindlg , $caption & ( ShowGUIInGerman() ? ' - Kopiere Dateien für ' : ' - Copying files for ' ) & $stroptions & '...' )
- DisableGUI()
- If IniRead( $inifilename , $ini_section_misc , $misc_token_minimize , $disabled ) = $enabled Then
- $result = RunWait( @ComSpec & ' /D /C CopyToTarget.cmd ' & $stroptions & ' "' & $strpath & '"' & $strswitches , @ScriptDir & '\cmd\' , @SW_SHOWMINNOACTIVE )
- Else
- $result = RunWait( @ComSpec & ' /D /C CopyToTarget.cmd ' & $stroptions & ' "' & $strpath & '"' & $strswitches , @ScriptDir & '\cmd\' , @SW_SHOW )
- EndIf
- If $result = 0 Then $result = @error
- If $result = 0 Then
- $runany = True
- Else
- WinSetState( $maindlg , $maindlg , @SW_RESTORE )
- If ShowGUIInGerman() Then
- $sMsgBoxTitle = 'Fehler'
- $sMsgBoxText = 'Fehler beim Kopieren der Dateien für ' & $stroptions & '.'
- Else
- $sMsgBoxTitle = 'Error'
- $sMsgBoxText = 'Error copying files for ' & $stroptions & '.'
- EndIf
- MsgBox( 0x2010 , $sMsgBoxTitle , $sMsgBoxText )
- EndIf
- WinSetTitle( $maindlg , $maindlg , $title )
- EnableGUI()
- Return $result
- EndFunc
- Func RunScripts( $stroptions , $skipdl , $strdownloadswitches , $runiso , $strisoswitches , $runusb , $strusbpath )
- Local $result
- If $skipdl Then
- $result = 0
- Else
- $result = RunDownloadScript( $stroptions , $strdownloadswitches )
- EndIf
- If $result = 0 AND $runiso Then
- $result = RunISOCreationScript( $stroptions , $strisoswitches )
- EndIf
- If $result = 0 AND $runusb AND FileExists( $strusbpath ) Then
- $result = RunUSBCreationScript( $stroptions , $strisoswitches , $strusbpath )
- EndIf
- Return $result
- EndFunc
- Func SaveSettings()
- Local $ii , $sOffString , $sWinString
- Local $sIniString , $sCurrentVar
- ; Make Pretty INI If None Exists
- If NOT FileExists( $inifilename ) Then
- For $ii = 1 To $aMainArray[0][0]
- If $aMainArray[$ii][0] <> '' Then
- If $aMainArray[$ii][1] <> '' Then
- Local $aSplit = StringSplit( $aMainArray[$ii][1] , '|' )
- For $jj = 1 To $aSplit[0]
- $sCurrentVar = Eval( StringReplace( 'ini section ' & $aSplit[$jj] , ' ' , '_' ))
- If StringInStr( $sWinString , $sCurrentVar ) = 0 Then $sWinString &= '[' & $sCurrentVar & ']' & @CRLF & @CRLF
- Next
- EndIf
- If $aMainArray[$ii][2] <> '' Then
- Local $aSplit = StringSplit( $aMainArray[$ii][2] , '|' )
- For $jj = 1 To $aSplit[0]
- $sCurrentVar = Eval( StringReplace( 'ini section ' & $aSplit[$jj] , ' ' , '_' ))
- If StringInStr( $sOffString , $sCurrentVar ) = 0 Then $sOffString &= '[' & $sCurrentVar & ']' & @CRLF & @CRLF
- Next
- EndIf
- EndIf
- Next
- $sIniString &= $sWinString & $sOffString & '[ISO Images]' & @CRLF & @CRLF & '[USB Images]' & @CRLF & @CRLF & '[Options]' & @CRLF & @CRLF & '[Miscellaneous]' & @CRLF
- FileWrite( $inifilename , $sIniString )
- EndIf
- ; Write Windows Settings
- _SaveSettingsWindowsAndOffice( 1 )
- ; Write Office Settings
- _SaveSettingsWindowsAndOffice( 2 )
- ; Image Creation
- IniWrite( $inifilename , $ini_section_iso , $iso_token_cd , CheckBoxStateToString( $cdiso ))
- IniWrite( $inifilename , $ini_section_iso , $iso_token_dvd , CheckBoxStateToString( $dvdiso ))
- IniWrite( $inifilename , $ini_section_usb , $usb_token_copy , CheckBoxStateToString( $usbcopy ))
- IniWrite( $inifilename , $ini_section_usb , $usb_token_path , GUICtrlRead( $usbpath ))
- IniWrite( $inifilename , $ini_section_usb , $usb_token_cleanup , CheckBoxStateToString( $usbclean ))
- ; Miscellaneous
- IniWrite( $inifilename , $ini_section_opts , $opts_token_verify , CheckBoxStateToString( $verifydownloads ))
- IniWrite( $inifilename , $ini_section_opts , $opts_token_includesp , CheckBoxStateToString( $includesp ))
- IniWrite( $inifilename , $ini_section_opts , $opts_token_includedotnet , CheckBoxStateToString( $dotnet ))
- IniWrite( $inifilename , $ini_section_opts , $opts_token_wle , CheckBoxStateToString( $wle ))
- IniWrite( $inifilename , $ini_section_opts , $opts_token_msse , CheckBoxStateToString( $msse ))
- IniWrite( $inifilename , $ini_section_opts , $opts_token_wddefs , CheckBoxStateToString( $wddefs ))
- IniWrite( $inifilename , $ini_section_misc , $misc_token_proxy , $proxy )
- IniWrite( $inifilename , $ini_section_misc , $misc_token_wsus , $wsus )
- Return 0
- EndFunc
- Func _SaveSettingsWindowsAndOffice( $iValue )
- Local $aSavSetSplit , $ii , $jj
- Local $sCurrentSec , $sCurrentKey , $sCurrentVal
- For $ii = 1 To $aMainArray[0][0]
- If $aMainArray[$ii][$iValue] <> '' Then
- $aSavSetSplit = StringSplit( $aMainArray[$ii][$iValue] , '|' )
- For $jj = 1 To $aSavSetSplit[0]
- $sCurrentSec = StringReplace( 'ini section ' & $aSavSetSplit[$jj] , ' ' , '_' )
- $sCurrentKey = StringReplace( 'lang token ' & $aMainArray[$ii][0] , ' ' , '_' )
- $sCurrentVal = StringReplace( $aSavSetSplit[$jj] & ' ' & $aMainArray[$ii][0] , ' ' , '_' )
- IniWrite( $inifilename , _
- Eval( $sCurrentSec ) , _
- Eval( $sCurrentKey ) , _
- CheckBoxStateToString( Eval( $sCurrentVal )))
- Next
- EndIf
- Next
- EndFunc
- Func CalcGUISize()
- Local $reg_val
- If StringInStr( 'WIN_VISTA|WIN_2008|WIN_7|WIN_2008R2|WIN_8|WIN_2012|WIN_81|WIN_2012R2' , @OSVersion ) > 0 Then
- DllCall( 'user32.dll' , 'int' , 'SetProcessDPIAware' )
- EndIf
- $reg_val = RegRead( $reg_key_hkcu_winmetrics , $reg_val_applieddpi )
- If $reg_val = '' Then
- $reg_val = RegRead( $reg_key_hkcu_desktop , $reg_val_logpixels )
- EndIf
- If $reg_val = '' Then $reg_val = $default_logpixels
- $dlgheight = 520 * $reg_val / $default_logpixels
- If ShowGUIInGerman() Then
- $txtwidth = 90 * $reg_val / $default_logpixels
- Else
- $txtwidth = 80 * $reg_val / $default_logpixels
- EndIf
- $txtheight = 20 * $reg_val / $default_logpixels
- $slimheight = 15 * $reg_val / $default_logpixels
- $btnwidth = 80 * $reg_val / $default_logpixels
- $btnheight = 30 * $reg_val / $default_logpixels
- $txtxoffset = 10 * $reg_val / $default_logpixels
- $txtyoffset = 10 * $reg_val / $default_logpixels
- Return 0
- EndFunc
- ; Main Dialog
- CalcGUISize()
- $groupwidth = 8 * $txtwidth + 2 * $txtxoffset
- $groupheight_lng = 4 * $txtheight
- $groupheight_glb = 2 * $txtheight
- $maindlg = GUICreate( $title , $groupwidth + 4 * $txtxoffset , $dlgheight )
- GUISetFont( 8.5 , 400 , 0 , 'Sans Serif' )
- If $CmdLine[0] > 0 AND StringRight( $CmdLine[$CmdLine[0]] , 4 ) = '.ini' Then
- $inifilename = $CmdLine[$CmdLine[0]]
- Else
- $inifilename = StringLeft( @ScriptFullPath , StringInStr( @ScriptFullPath , '.' , 0 , -1 )) & 'ini'
- EndIf
- ; Label
- $txtxpos = $txtxoffset
- $txtypos = $txtyoffset
- GUICtrlCreateLabel( ShowGUIInGerman() ? 'Lade Microsoft-Updates für...' : 'Download Microsoft Updates for...' , _
- $txtxpos , $txtypos , 3 * $groupwidth / 4 , $txtheight )
- ; ==========================================
- ; == Medium Info Group
- ; ==========================================
- $txtxpos = $txtxoffset + 3 * $groupwidth / 4
- $txtypos = 0
- GUICtrlCreateGroup( ShowGUIInGerman() ? 'Repository-Info' : 'Repository info' , _
- $txtxpos , $txtypos , $groupwidth / 4 + 2 * $txtxoffset , 2 * $txtheight )
- $txtypos = $txtypos + 1.5 * $txtyoffset + 2
- $txtxpos = $txtxpos + $txtxoffset
- $buildlbl = GUICtrlCreateLabel(( ShowGUIInGerman() ? 'Letzter Download: ' : 'Last download: ' ) & LastDownloadRun() , _
- $txtxpos , $txtypos , $groupwidth / 4 , $txtheight )
- ; Tab control
- $txtypos = $txtyoffset + $txtheight
- $txtxpos = $txtxoffset
- GuiCtrlCreateTab( $txtxpos , $txtypos , $groupwidth + 2 * $txtxoffset , $groupheight_lng + 4 * $groupheight_glb + 3.5 * $txtyoffset )
- ; ////////////////////////////////////////
- ; /// Operating Systems' Tab
- ; ////////////////////////////////////////
- #Region
- $tabitemfocused = GuiCtrlCreateTabItem( 'Windows' )
- ; ==========================================
- ; == Windows Vista / Server 2008 Group
- ; ==========================================
- $txtypos = 3.5 * $txtyoffset + $txtheight
- $txtxpos = 2 * $txtxoffset
- GUICtrlCreateGroup( 'Windows Vista / Server 2008 (w60 / w60-x64)' , $txtxpos , $txtypos , $groupwidth , $groupheight_glb )
- ; Windows Vista / Server 2008 Global
- $txtypos = $txtypos + 1.5 * $txtyoffset
- $txtxpos = 3 * $txtxoffset
- $w60_glb = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $groupwidth / 2 - $txtxoffset , $txtheight )
- ; Windows Vista / Server 2008 x64 Global
- $txtxpos = $txtxpos + $groupwidth / 2 - $txtxoffset
- $w60_x64_glb = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $groupwidth / 2 - $txtxoffset , $txtheight )
- ; ==========================================
- ; == Windows 7 / Server 2008 R2 Group
- ; ==========================================
- $txtypos = $txtypos + 2.5 * $txtyoffset
- $txtxpos = 2 * $txtxoffset
- GUICtrlCreateGroup( 'Windows 7 / Server 2008 R2 (w61 / w61-x64)' , $txtxpos , $txtypos , $groupwidth , $groupheight_glb )
- ; Windows 7 Global
- $txtypos = $txtypos + 1.5 * $txtyoffset
- $txtxpos = 3 * $txtxoffset
- $w61_glb = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $groupwidth / 2 - $txtxoffset , $txtheight )
- ; Windows 7 / Server 2008 R2 x64 Global
- $txtxpos = $txtxpos + $groupwidth / 2 - $txtxoffset
- $w61_x64_glb = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $groupwidth / 2 - $txtxoffset , $txtheight )
- ; ==========================================
- ; == Windows 8 / Server 2012 Group
- ; ==========================================
- $txtypos = $txtypos + 2.5 * $txtyoffset
- $txtxpos = 2 * $txtxoffset
- GUICtrlCreateGroup( 'Windows 8 / Server 2012 (w62 / w62-x64)' , $txtxpos , $txtypos , $groupwidth , $groupheight_glb )
- ; Windows 8 Global
- $txtypos = $txtypos + 1.5 * $txtyoffset
- $txtxpos = 3 * $txtxoffset
- $w62_glb = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $groupwidth / 2 - $txtxoffset , $txtheight )
- ; Windows 8 / Server 2012 x64 Global
- $txtxpos = $txtxpos + $groupwidth / 2 - $txtxoffset
- $w62_x64_glb = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $groupwidth / 2 - $txtxoffset , $txtheight )
- ; ==========================================
- ; == Windows 8.1 / Server 2012 R2 Group
- ; ==========================================
- $txtypos = $txtypos + 2.5 * $txtyoffset
- $txtxpos = 2 * $txtxoffset
- GUICtrlCreateGroup( 'Windows 8.1 / Server 2012 R2 (w63 / w63-x64)' , $txtxpos , $txtypos , $groupwidth , $groupheight_glb )
- ; Windows 8.1 Global
- $txtypos = $txtypos + 1.5 * $txtyoffset
- $txtxpos = 3 * $txtxoffset
- $w63_glb = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $groupwidth / 2 - $txtxoffset , $txtheight )
- ; Windows 8.1 / Server 2012 R2 x64 Global
- $txtxpos = $txtxpos + $groupwidth / 2 - $txtxoffset
- $w63_x64_glb = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $groupwidth / 2 - $txtxoffset , $txtheight )
- #EndRegion
- ; ////////////////////////////////////////
- ; /// Office Suites' Tab
- ; ////////////////////////////////////////
- #Region
- GuiCtrlCreateTabItem( 'Office' )
- ; ==========================================
- ; == Office 2007 Group
- ; ==========================================
- #Region
- $txtypos = 3.5 * $txtyoffset + $txtheight
- $txtxpos = 2 * $txtxoffset
- GUICtrlCreateGroup( 'Office 2007 (o2k7)' , $txtxpos , $txtypos , $groupwidth , $groupheight_lng )
- ; Office 2007 English
- $txtypos = $txtypos + 1.5 * $txtyoffset
- $txtxpos = 3 * $txtxoffset
- $o2k7_enu = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth - 5 , $txtheight )
- ; Office 2007 French
- $txtxpos = $txtxpos + $txtwidth - 5
- $o2k7_fra = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth + 10 , $txtheight )
- ; Office 2007 Spanish
- $txtxpos = $txtxpos + $txtwidth + 10
- $o2k7_esn = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth - 5 , $txtheight )
- ; Office 2007 Japanese
- $txtxpos = $txtxpos + $txtwidth - 5
- $o2k7_jpn = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth , $txtheight )
- ; Office 2007 Korean
- $txtxpos = $txtxpos + $txtwidth
- $o2k7_kor = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth + 5 , $txtheight )
- ; Office 2007 Russian
- $txtxpos = $txtxpos + $txtwidth + 5
- $o2k7_rus = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth - 10 , $txtheight )
- ; Office 2007 Portuguese
- $txtxpos = $txtxpos + $txtwidth - 10
- $o2k7_ptg = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth + 5 , $txtheight )
- ; Office 2007 Brazilian
- $txtxpos = $txtxpos + $txtwidth + 5
- $o2k7_ptb = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth , $txtheight )
- ; Office 2007 German
- $txtypos = $txtypos + $txtheight
- $txtxpos = 3 * $txtxoffset
- $o2k7_deu = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth - 5 , $txtheight )
- ; Office 2007 Dutch
- $txtxpos = $txtxpos + $txtwidth - 5
- $o2k7_nld = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth + 10 , $txtheight )
- ; Office 2007 Italian
- $txtxpos = $txtxpos + $txtwidth + 10
- $o2k7_ita = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth - 5 , $txtheight )
- ; Office 2007 Chinese Simplified
- $txtxpos = $txtxpos + $txtwidth - 5
- $o2k7_chs = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth , $txtheight )
- ; Office 2007 Chinese Traditional
- $txtxpos = $txtxpos + $txtwidth
- $o2k7_cht = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth + 5 , $txtheight )
- ; Office 2007 Polish
- $txtxpos = $txtxpos + $txtwidth + 5
- $o2k7_plk = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth - 10 , $txtheight )
- ; Office 2007 Hungarian
- $txtxpos = $txtxpos + $txtwidth - 10
- $o2k7_hun = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth + 5 , $txtheight )
- ; Office 2007 Czech
- $txtxpos = $txtxpos + $txtwidth + 5
- $o2k7_csy = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth , $txtheight )
- ; Office 2007 Swedish
- $txtypos = $txtypos + $txtheight
- $txtxpos = 3 * $txtxoffset
- $o2k7_sve = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth - 5 , $txtheight )
- ; Office 2007 Turkish
- $txtxpos = $txtxpos + $txtwidth - 5
- $o2k7_trk = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth + 10 , $txtheight )
- ; Office 2007 Greek
- $txtxpos = $txtxpos + $txtwidth + 10
- $o2k7_ell = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth - 5 , $txtheight )
- ; Office 2007 Arabic
- $txtxpos = $txtxpos + $txtwidth - 5
- $o2k7_ara = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth , $txtheight )
- ; Office 2007 Hebrew
- $txtxpos = $txtxpos + $txtwidth
- $o2k7_heb = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth + 5 , $txtheight )
- ; Office 2007 Danish
- $txtxpos = $txtxpos + $txtwidth + 5
- $o2k7_dan = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth - 10 , $txtheight )
- ; Office 2007 Norwegian
- $txtxpos = $txtxpos + $txtwidth - 10
- $o2k7_nor = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth + 5 , $txtheight )
- ; Office 2007 Finnish
- $txtxpos = $txtxpos + $txtwidth + 5
- $o2k7_fin = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth , $txtheight )
- #EndRegion
- ; ==========================================
- ; == Office 2010 Group
- ; ==========================================
- #Region
- $txtypos = $txtypos + 2.5 * $txtyoffset
- $txtxpos = 2 * $txtxoffset
- GUICtrlCreateGroup( 'Office 2010 (o2k10)' , $txtxpos , $txtypos , $groupwidth , $groupheight_lng )
- ; Office 2010 English
- $txtypos = $txtypos + 1.5 * $txtyoffset
- $txtxpos = 3 * $txtxoffset
- $o2k10_enu = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth - 5 , $txtheight )
- ; Office 2010 French
- $txtxpos = $txtxpos + $txtwidth - 5
- $o2k10_fra = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth + 10 , $txtheight )
- ; Office 2010 Spanish
- $txtxpos = $txtxpos + $txtwidth + 10
- $o2k10_esn = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth - 5 , $txtheight )
- ; Office 2010 Japanese
- $txtxpos = $txtxpos + $txtwidth - 5
- $o2k10_jpn = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth , $txtheight )
- ; Office 2010 Korean
- $txtxpos = $txtxpos + $txtwidth
- $o2k10_kor = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth + 5 , $txtheight )
- ; Office 2010 Russian
- $txtxpos = $txtxpos + $txtwidth + 5
- $o2k10_rus = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth - 10 , $txtheight )
- ; Office 2010 Portuguese
- $txtxpos = $txtxpos + $txtwidth - 10
- $o2k10_ptg = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth + 5 , $txtheight )
- ; Office 2010 Brazilian
- $txtxpos = $txtxpos + $txtwidth + 5
- $o2k10_ptb = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth , $txtheight )
- ; Office 2010 German
- $txtypos = $txtypos + $txtheight
- $txtxpos = 3 * $txtxoffset
- $o2k10_deu = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth - 5 , $txtheight )
- ; Office 2010 Dutch
- $txtxpos = $txtxpos + $txtwidth - 5
- $o2k10_nld = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth + 10 , $txtheight )
- ; Office 2010 Italian
- $txtxpos = $txtxpos + $txtwidth + 10
- $o2k10_ita = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth - 5 , $txtheight )
- ; Office 2010 Chinese simplified
- $txtxpos = $txtxpos + $txtwidth - 5
- $o2k10_chs = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth , $txtheight )
- ; Office 2010 Chinese traditional
- $txtxpos = $txtxpos + $txtwidth
- $o2k10_cht = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth + 5 , $txtheight )
- ; Office 2010 Polish
- $txtxpos = $txtxpos + $txtwidth + 5
- $o2k10_plk = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth - 10 , $txtheight )
- ; Office 2010 Hungarian
- $txtxpos = $txtxpos + $txtwidth - 10
- $o2k10_hun = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth + 5 , $txtheight )
- ; Office 2010 Czech
- $txtxpos = $txtxpos + $txtwidth + 5
- $o2k10_csy = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth , $txtheight )
- ; Office 2010 Swedish
- $txtypos = $txtypos + $txtheight
- $txtxpos = 3 * $txtxoffset
- $o2k10_sve = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth - 5 , $txtheight )
- ; Office 2010 Turkish
- $txtxpos = $txtxpos + $txtwidth - 5
- $o2k10_trk = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth + 10 , $txtheight )
- ; Office 2010 Greek
- $txtxpos = $txtxpos + $txtwidth + 10
- $o2k10_ell = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth - 5 , $txtheight )
- ; Office 2010 Arabic
- $txtxpos = $txtxpos + $txtwidth - 5
- $o2k10_ara = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth , $txtheight )
- ; Office 2010 Hebrew
- $txtxpos = $txtxpos + $txtwidth
- $o2k10_heb = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth + 5 , $txtheight )
- ; Office 2010 Danish
- $txtxpos = $txtxpos + $txtwidth + 5
- $o2k10_dan = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth - 10 , $txtheight )
- ; Office 2010 Norwegian
- $txtxpos = $txtxpos + $txtwidth - 10
- $o2k10_nor = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth + 5 , $txtheight )
- ; Office 2010 Finnish
- $txtxpos = $txtxpos + $txtwidth + 5
- $o2k10_fin = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth , $txtheight )
- #EndRegion
- ; ==========================================
- ; == Office 2013 Group
- ; ==========================================
- #Region
- $txtxpos = 2 * $txtxoffset
- $txtypos = $txtypos + 2.5 * $txtyoffset
- GUICtrlCreateGroup( 'Office 2013 (o2k13)' , $txtxpos , $txtypos , $groupwidth , $groupheight_lng )
- ; Office 2013 English
- $txtypos = $txtypos + 1.5 * $txtyoffset
- $txtxpos = 3 * $txtxoffset
- $o2k13_enu = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth - 5 , $txtheight )
- ; Office 2013 French
- $txtxpos = $txtxpos + $txtwidth - 5
- $o2k13_fra = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth + 10 , $txtheight )
- ; Office 2013 Spanish
- $txtxpos = $txtxpos + $txtwidth + 10
- $o2k13_esn = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth - 5 , $txtheight )
- ; Office 2013 Japanese
- $txtxpos = $txtxpos + $txtwidth - 5
- $o2k13_jpn = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth , $txtheight )
- ; Office 2013 Korean
- $txtxpos = $txtxpos + $txtwidth
- $o2k13_kor = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth + 5 , $txtheight )
- ; Office 2013 Russian
- $txtxpos = $txtxpos + $txtwidth + 5
- $o2k13_rus = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth - 10 , $txtheight )
- ; Office 2013 Portuguese
- $txtxpos = $txtxpos + $txtwidth - 10
- $o2k13_ptg = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth + 5 , $txtheight )
- ; Office 2013 Brazilian
- $txtxpos = $txtxpos + $txtwidth + 5
- $o2k13_ptb = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth , $txtheight )
- ; Office 2013 German
- $txtypos = $txtypos + $txtheight
- $txtxpos = 3 * $txtxoffset
- $o2k13_deu = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth - 5 , $txtheight )
- ; Office 2013 Dutch
- $txtxpos = $txtxpos + $txtwidth - 5
- $o2k13_nld = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth + 10 , $txtheight )
- ; Office 2013 Italian
- $txtxpos = $txtxpos + $txtwidth + 10
- $o2k13_ita = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth - 5 , $txtheight )
- ; Office 2013 Chinese simplified
- $txtxpos = $txtxpos + $txtwidth - 5
- $o2k13_chs = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth , $txtheight )
- ; Office 2013 Chinese traditional
- $txtxpos = $txtxpos + $txtwidth
- $o2k13_cht = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth + 5 , $txtheight )
- ; Office 2013 Polish
- $txtxpos = $txtxpos + $txtwidth + 5
- $o2k13_plk = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth - 10 , $txtheight )
- ; Office 2013 Hungarian
- $txtxpos = $txtxpos + $txtwidth - 10
- $o2k13_hun = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth + 5 , $txtheight )
- ; Office 2013 Czech
- $txtxpos = $txtxpos + $txtwidth + 5
- $o2k13_csy = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth , $txtheight )
- ; Office 2013 Swedish
- $txtypos = $txtypos + $txtheight
- $txtxpos = 3 * $txtxoffset
- $o2k13_sve = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth - 5 , $txtheight )
- ; Office 2013 Turkish
- $txtxpos = $txtxpos + $txtwidth - 5
- $o2k13_trk = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth + 10 , $txtheight )
- ; Office 2013 Greek
- $txtxpos = $txtxpos + $txtwidth + 10
- $o2k13_ell = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth - 5 , $txtheight )
- ; Office 2013 Arabic
- $txtxpos = $txtxpos + $txtwidth - 5
- $o2k13_ara = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth , $txtheight )
- ; Office 2013 Hebrew
- $txtxpos = $txtxpos + $txtwidth
- $o2k13_heb = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth + 5 , $txtheight )
- ; Office 2013 Danish
- $txtxpos = $txtxpos + $txtwidth + 5
- $o2k13_dan = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth - 10 , $txtheight )
- ; Office 2013 Norwegian
- $txtxpos = $txtxpos + $txtwidth - 10
- $o2k13_nor = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth + 5 , $txtheight )
- ; Office 2013 Finnish
- $txtxpos = $txtxpos + $txtwidth + 5
- $o2k13_fin = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth , $txtheight )
- #EndRegion
- #EndRegion
- ; ////////////////////////////////////////
- ; /// Legacy products Tab
- ; ////////////////////////////////////////
- #Region
- GuiCtrlCreateTabItem( ShowGUIInGerman() ? 'Altprodukte' : 'Legacy Products' )
- ; ==========================================
- ; == Windows Server 2003 Group
- ; ==========================================
- #Region
- $txtypos = 3.5 * $txtyoffset + $txtheight
- $txtxpos = 2 * $txtxoffset
- GUICtrlCreateGroup( 'Windows Server 2003 (w2k3)' , $txtxpos , $txtypos , $groupwidth , $groupheight_lng )
- ; Windows Server 2003 English
- $txtypos = $txtypos + 1.5 * $txtyoffset
- $txtxpos = 3 * $txtxoffset
- $w2k3_enu = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth - 5 , $txtheight )
- ; Windows Server 2003 French
- $txtxpos = $txtxpos + $txtwidth - 5
- $w2k3_fra = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth + 10 , $txtheight )
- ; Windows Server 2003 Spanish
- $txtxpos = $txtxpos + $txtwidth + 10
- $w2k3_esn = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth - 5 , $txtheight )
- ; Windows Server 2003 Japanese
- $txtxpos = $txtxpos + $txtwidth - 5
- $w2k3_jpn = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth , $txtheight )
- ; Windows Server 2003 Korean
- $txtxpos = $txtxpos + $txtwidth
- $w2k3_kor = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth + 5 , $txtheight )
- ; Windows Server 2003 Russian
- $txtxpos = $txtxpos + $txtwidth + 5
- $w2k3_rus = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth - 10 , $txtheight )
- ; Windows Server 2003 Portuguese
- $txtxpos = $txtxpos + $txtwidth - 10
- $w2k3_ptg = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth + 5 , $txtheight )
- ; Windows Server 2003 Brazilian
- $txtxpos = $txtxpos + $txtwidth + 5
- $w2k3_ptb = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth , $txtheight )
- ; Windows Server 2003 German
- $txtypos = $txtypos + $txtheight
- $txtxpos = 3 * $txtxoffset
- $w2k3_deu = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth - 5 , $txtheight )
- ; Windows Server 2003 Dutch
- $txtxpos = $txtxpos + $txtwidth - 5
- $w2k3_nld = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth + 10 , $txtheight )
- ; Windows Server 2003 Italian
- $txtxpos = $txtxpos + $txtwidth + 10
- $w2k3_ita = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth - 5 , $txtheight )
- ; Windows Server 2003 Chinese Simplified
- $txtxpos = $txtxpos + $txtwidth - 5
- $w2k3_chs = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth , $txtheight )
- ; Windows Server 2003 Chinese Traditional
- $txtxpos = $txtxpos + $txtwidth
- $w2k3_cht = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth + 5 , $txtheight )
- ; Windows Server 2003 Polish
- $txtxpos = $txtxpos + $txtwidth + 5
- $w2k3_plk = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth - 10 , $txtheight )
- ; Windows Server 2003 Hungarian
- $txtxpos = $txtxpos + $txtwidth - 10
- $w2k3_hun = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth + 5 , $txtheight )
- ; Windows Server 2003 Czech
- $txtxpos = $txtxpos + $txtwidth + 5
- $w2k3_csy = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth , $txtheight )
- ; Windows Server 2003 Swedish
- $txtypos = $txtypos + $txtheight
- $txtxpos = 3 * $txtxoffset
- $w2k3_sve = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth - 5 , $txtheight )
- ; Windows Server 2003 Turkish
- $txtxpos = $txtxpos + $txtwidth - 5
- $w2k3_trk = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth + 10 , $txtheight )
- ; Windows Server 2003 Greek
- $txtxpos = $txtxpos + $txtwidth + 10
- $w2k3_ell = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth - 5 , $txtheight )
- ; Windows Server 2003 Arabic
- $txtxpos = $txtxpos + $txtwidth - 5
- $w2k3_ara = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth , $txtheight )
- ; Windows Server 2003 Hebrew
- $txtxpos = $txtxpos + $txtwidth
- $w2k3_heb = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth + 5 , $txtheight )
- ; Windows Server 2003 Danish
- $txtxpos = $txtxpos + $txtwidth + 5
- $w2k3_dan = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth - 10 , $txtheight )
- ; Windows Server 2003 Norwegian
- $txtxpos = $txtxpos + $txtwidth - 10
- $w2k3_nor = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth + 5 , $txtheight )
- ; Windows Server 2003 Finnish
- $txtxpos = $txtxpos + $txtwidth + 5
- $w2k3_fin = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth , $txtheight )
- #EndRegion
- ; ==========================================
- ; == Windows Server 2003 x64 Group
- ; ==========================================
- #Region
- $txtxpos = 2 * $txtxoffset
- $txtypos = $txtypos + 2.5 * $txtyoffset
- GUICtrlCreateGroup( ShowGUIInGerman() ? 'Windows Server 2003 x64-Editionen (w2k3-x64)' : 'Windows Server 2003 x64 editions (w2k3-x64)' , _
- $txtxpos , $txtypos , $groupwidth , $groupheight_glb )
- ; Windows Server 2003 x64 English
- $txtypos = $txtypos + 1.5 * $txtyoffset
- $txtxpos = 3 * $txtxoffset
- $w2k3_x64_enu = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth - 5 , $txtheight )
- ; Windows Server 2003 x64 French
- $txtxpos = $txtxpos + $txtwidth - 5
- $w2k3_x64_fra = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth + 10 , $txtheight )
- ; Windows Server 2003 x64 Spanish
- $txtxpos = $txtxpos + $txtwidth + 10
- $w2k3_x64_esn = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth - 5 , $txtheight )
- ; Windows Server 2003 x64 Japanese
- $txtxpos = $txtxpos + $txtwidth - 5
- $w2k3_x64_jpn = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth , $txtheight )
- ; Windows Server 2003 x64 Korean
- $txtxpos = $txtxpos + $txtwidth
- $w2k3_x64_kor = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth + 5 , $txtheight )
- ; Windows Server 2003 x64 Russian
- $txtxpos = $txtxpos + $txtwidth + 5
- $w2k3_x64_rus = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth - 10 , $txtheight )
- ; Windows Server 2003 x64 Brazilian
- $txtxpos = $txtxpos + $txtwidth - 10
- $w2k3_x64_ptb = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth + 5 , $txtheight )
- ; Windows Server 2003 x64 German
- $txtxpos = $txtxpos + $txtwidth + 5
- $w2k3_x64_deu = GUICtrlCreateCheckbox( '' , $txtxpos , $txtypos , $txtwidth , $txtheight )
- #EndRegion
- ; ==========================================
- ; == Product Lifecycle Group
- ; ==========================================
- #Region
- $txtypos = $txtypos + 2.5 * $txtyoffset
- $txtxpos = 2 * $txtxoffset
- GUICtrlCreateGroup( ShowGUIInGerman() ? 'Produkt-Lebenszyklus-Informationen' : 'Product lifecycle information' , _
- $txtxpos , $txtypos , $groupwidth , $groupheight_glb )
- ; Product Lifecycle Label
- $txtypos = $txtypos + 2 * $txtyoffset
- $txtxpos = 3 * $txtxoffset
- GUICtrlCreateLabel( ShowGUIInGerman() ? 'Diese Produkte wurden von Microsoft zum 14. Juli 2015 abgekündigt.' : 'Microsoft will discontinue support for these products on July 14th , 2015.' , _
- $txtxpos , $txtypos , $groupwidth - 2 * $txtxoffset , $txtheight )
- ; End Tab Item Definition
- GuiCtrlCreateTabItem('')
- GUICtrlSetState( $tabitemfocused , $GUI_SHOW )
- #EndRegion
- #EndRegion
- ; ==========================================
- ; == Options Group
- ; ==========================================
- #Region
- $txtypos = $groupheight_lng + 4 * $groupheight_glb + 7 * $txtyoffset
- $txtxpos = $txtxoffset
- GUICtrlCreateGroup( ShowGUIInGerman() ? 'Optionen' : 'Options' , $txtxpos , $txtypos , $groupwidth + 2 * $txtxoffset , $groupheight_lng )
- ; Verify Downloads
- $txtypos = $txtypos + 1.5 * $txtyoffset
- $txtxpos = 2 * $txtxoffset
- $verifydownloads = GUICtrlCreateCheckbox( ShowGUIInGerman() ? 'Heruntergeladene Updates verifizieren' : 'Verify downloaded updates' , _
- $txtxpos , $txtypos , $groupwidth / 2 , $txtheight )
- If IniRead( $inifilename , $ini_section_opts , $opts_token_verify , $enabled ) = $enabled Then GUICtrlSetState( -1 , $GUI_CHECKED )
- If IniRead( $inifilename , $ini_section_misc , $misc_token_skipdownload , $disabled ) = $enabled Then GUICtrlSetState( -1 , $GUI_DISABLE )
- ; Include Service Packs
- $txtxpos = $txtxpos + $groupwidth / 2
- $includesp = GUICtrlCreateCheckbox( ShowGUIInGerman() ? 'Service-Packs einschließen' : 'Include Service Packs' , _
- $txtxpos , $txtypos , $groupwidth / 2 , $txtheight )
- If IniRead( $inifilename , $ini_section_opts , $opts_token_allowsp , $enabled ) = $enabled Then
- If IniRead( $inifilename , $ini_section_opts , $opts_token_includesp , $enabled ) = $enabled Then
- GUICtrlSetState( -1 , $GUI_CHECKED )
- Else
- GUICtrlSetState( -1 , $GUI_UNCHECKED )
- EndIf
- Else
- GUICtrlSetState( -1 , $GUI_UNCHECKED + $GUI_DISABLE )
- EndIf
- If IniRead( $inifilename , $ini_section_misc , $misc_token_skipdownload , $disabled ) = $enabled Then GUICtrlSetState( -1 , $GUI_DISABLE )
- ; Include .NET Frameworks 3.5 SP1 and 4
- $txtypos = $txtypos + $txtheight
- $txtxpos = 2 * $txtxoffset
- $dotnet = GUICtrlCreateCheckbox( ShowGUIInGerman() ? 'C++-Laufzeitbibliotheken und .NET Frameworks einschließen' : 'Include C++ Runtime Libraries and .NET Frameworks' , _
- $txtxpos , $txtypos , $groupwidth / 2 , $txtheight )
- If IniRead( $inifilename , $ini_section_opts , $opts_token_allowdotnet , $enabled ) = $enabled Then
- If IniRead( $inifilename , $ini_section_opts , $opts_token_includedotnet , $disabled ) = $enabled Then
- GUICtrlSetState( -1 , $GUI_CHECKED )
- Else
- GUICtrlSetState( -1 , $GUI_UNCHECKED )
- EndIf
- Else
- GUICtrlSetState( -1 , $GUI_UNCHECKED + $GUI_DISABLE )
- EndIf
- ; Include Windows Essentials 2012
- $txtxpos = $txtxpos + $groupwidth / 2
- $wle = GUICtrlCreateCheckbox( ShowGUIInGerman() ? 'Windows Essentials 2012 einschließen' : 'Include Windows Essentials 2012' , _
- $txtxpos , $txtypos , $groupwidth / 2 , $txtheight )
- If IniRead( $inifilename , $ini_section_opts , $opts_token_wle , $disabled ) = $enabled Then GUICtrlSetState( -1 , $GUI_CHECKED )
- If IniRead( $inifilename , $ini_section_misc , $misc_token_skipdownload , $disabled ) = $enabled Then GUICtrlSetState( -1 , $GUI_DISABLE )
- ; Include Microsoft Security Essentials
- $txtypos = $txtypos + $txtheight
- $txtxpos = 2 * $txtxoffset
- $msse = GUICtrlCreateCheckbox( ShowGUIInGerman() ? 'Microsoft Security Essentials einschließen' : 'Include Microsoft Security Essentials' , _
- $txtxpos , $txtypos , $groupwidth / 2 , $txtheight )
- If IniRead( $inifilename , $ini_section_opts , $opts_token_msse , $disabled ) = $enabled Then GUICtrlSetState( -1 , $GUI_CHECKED )
- If IniRead( $inifilename , $ini_section_misc , $misc_token_skipdownload , $disabled ) = $enabled Then GUICtrlSetState( -1 , $GUI_DISABLE )
- ; Include Windows Defender Definitions
- $txtxpos = $txtxpos + $groupwidth / 2
- $wddefs = GUICtrlCreateCheckbox( ShowGUIInGerman() ? 'Windows Defender-Definitionen einschließen' : 'Include Windows Defender definitions' , _
- $txtxpos , $txtypos , $groupwidth / 2 , $txtheight )
- If IniRead( $inifilename , $ini_section_opts , $opts_token_wddefs , $disabled ) = $enabled Then GUICtrlSetState( -1 , $GUI_CHECKED )
- If IniRead( $inifilename , $ini_section_misc , $misc_token_skipdownload , $disabled ) = $enabled Then GUICtrlSetState( -1 , $GUI_DISABLE )
- #EndRegion
- ; ==========================================
- ; == ISO-Image Group
- ; ==========================================
- #Region
- $txtypos = $txtypos + 2.5 * $txtyoffset
- $txtxpos = $txtxoffset
- GUICtrlCreateGroup( ShowGUIInGerman() ? 'Erstelle ISO-Image(s)...' : 'Create ISO image(s)...' , _
- $txtxpos , $txtypos , $groupwidth + 2 * $txtxoffset , $groupheight_glb )
- ; CD ISO Image
- $txtypos = $txtypos + 1.5 * $txtyoffset
- $txtxpos = 2 * $txtxoffset
- $cdiso = GUICtrlCreateCheckbox( ShowGUIInGerman() ? 'pro Produkt und Sprache' : 'per selected product and language' , _
- $txtxpos , $txtypos , $groupwidth / 2 , $txtheight )
- If IniRead( $inifilename , $ini_section_misc , $misc_token_skipdownload , $disabled ) = $enabled Then
- GUICtrlSetState( -1 , $GUI_UNCHECKED + $GUI_DISABLE )
- Else
- If IniRead( $inifilename , $ini_section_iso , $iso_token_cd , $disabled ) = $enabled Then
- GUICtrlSetState( -1 , $GUI_CHECKED )
- Else
- GUICtrlSetState( -1 , $GUI_UNCHECKED )
- EndIf
- EndIf
- ; Cross-Platform DVD ISO image
- $txtxpos = $txtxpos + $groupwidth / 2
- $dvdiso = GUICtrlCreateCheckbox( ShowGUIInGerman() ? 'pro Sprache, x86-produktübergreifend (nur Desktop-Produkte)' : 'per selected language, x86-cross-product (desktop only)' , _
- $txtxpos , $txtypos , $groupwidth / 2 , $txtheight )
- If IniRead( $inifilename , $ini_section_misc , $misc_token_skipdownload , $disabled ) = $enabled Then
- GUICtrlSetState( -1 , $GUI_UNCHECKED + $GUI_DISABLE )
- Else
- If IniRead( $inifilename , $ini_section_iso , $iso_token_dvd , $disabled ) = $enabled Then
- GUICtrlSetState( -1 , $GUI_CHECKED )
- Else
- GUICtrlSetState( -1 , $GUI_UNCHECKED )
- EndIf
- EndIf
- #EndRegion
- ; ==========================================
- ; == USB-Image Group
- ; ==========================================
- #Region
- $txtypos = $txtypos + 2.5 * $txtyoffset
- $txtxpos = $txtxoffset
- GUICtrlCreateGroup( ShowGUIInGerman() ? 'USB-Medium' : 'USB Medium' , $txtxpos , $txtypos , $groupwidth + 2 * $txtxoffset , $groupheight_glb )
- ; USB Image
- $txtypos = $txtypos + 1.5 * $txtyoffset
- $txtxpos = 2 * $txtxoffset
- $usbcopy = GUICtrlCreateCheckbox( ShowGUIInGerman() ? 'Kopiere Updates für gewählte Produkte ins Verzeichnis:' : 'Copy updates for selected products into directory:' , _
- $txtxpos , $txtypos , $groupwidth / 2 , $txtheight )
- If IniRead( $inifilename , $ini_section_misc , $misc_token_skipdownload , $disabled ) = $enabled Then
- GUICtrlSetState( -1 , $GUI_UNCHECKED + $GUI_DISABLE )
- Else
- If IniRead( $inifilename , $ini_section_usb , $usb_token_copy , $disabled ) = $enabled AND _
- IniRead( $inifilename , $ini_section_usb , $usb_token_path , '' ) <> '' Then
- GUICtrlSetState( -1 , $GUI_CHECKED )
- Else
- GUICtrlSetState( -1 , $GUI_UNCHECKED )
- EndIf
- EndIf
- ; USB Target
- $txtxpos = $txtxpos + $groupwidth / 2
- $usbpath = GUICtrlCreateInput( IniRead( $inifilename , $ini_section_usb , $usb_token_path , '' ) , _
- $txtxpos , $txtypos - 2 , 2 * $txtwidth - $txtxoffset - $txtheight , $txtheight )
- ; USB FSF button - FileSelectFolder
- $txtxpos = $txtxpos + 2 * $txtwidth - $txtxoffset - $txtheight
- $usbfsf = GUICtrlCreateButton( '...' , $txtxpos , $txtypos - 2 , $txtheight , $txtheight )
- ; USB Cleanup
- $txtxpos = $txtxpos + $txtheight + $txtxoffset
- $usbclean = GUICtrlCreateCheckbox( ShowGUIInGerman() ? 'Zielverzeichnis bereinigen' : 'Clean up target directory' , _
- $txtxpos , $txtypos , 2 * $txtwidth , $txtheight )
- If IniRead( $inifilename , $ini_section_usb , $usb_token_cleanup , $disabled ) = $enabled Then GUICtrlSetState( -1 , $GUI_CHECKED )
- If IsCheckBoxChecked( $usbcopy ) Then
- GUICtrlSetState( $usbpath , $GUI_ENABLE )
- GUICtrlSetState( $usbfsf , $GUI_ENABLE )
- GUICtrlSetState( $usbclean , $GUI_ENABLE )
- Else
- GUICtrlSetState( $usbpath , $GUI_DISABLE )
- GUICtrlSetState( $usbfsf , $GUI_DISABLE )
- GUICtrlSetState( $usbclean , $GUI_DISABLE )
- EndIf
- #EndRegion
- #Region Other Controls
- ; Start Button
- $txtypos = $txtypos + 1.5 * $txtyoffset + $txtheight
- $txtxpos = $txtxoffset
- $btn_start = GUICtrlCreateButton( 'Start' , $txtxpos , $txtypos , $btnwidth , $btnheight )
- GUICtrlSetResizing( -1 , $GUI_DOCKLEFT + $GUI_DOCKBOTTOM )
- ; Image Only Checkbox
- $txtxpos = $txtxpos + $btnwidth + $txtxoffset
- $imageonly = GUICtrlCreateCheckbox( ShowGUIInGerman() ? 'Nur ISO / USB präparieren' : 'Only prepare ISO / USB' , _
- $txtxpos , $txtypos , 2 * $txtwidth , $slimheight )
- If IniRead( $inifilename , $ini_section_misc , $misc_token_skipdownload , $disabled ) = $enabled Then GUICtrlSetState( -1 , $GUI_DISABLE )
- If NOT IsCheckBoxChecked( $cdiso ) OR IsCheckBoxChecked( $dvdiso ) OR IsCheckBoxChecked( $usbcopy ) Then GUICtrlSetState( -1 , $GUI_DISABLE )
- ; Scripting Checkbox
- $scripting = GUICtrlCreateCheckbox( ShowGUIInGerman() ? 'Nur Sammelskript erstellen' : 'Only create collection script' , _
- $txtxpos , $txtypos + $slimheight , 2 * $txtwidth , $slimheight )
- If IniRead( $inifilename , $ini_section_misc , $misc_token_showshutdown , $disabled ) = $enabled Then GUICtrlSetState( -1 , $GUI_HIDE )
- ; Shutdown Checkbox
- $shutdown = GUICtrlCreateCheckbox( ShowGUIInGerman() ? 'Herunterfahren nach Abschluss' : 'Shut down on completion' , _
- $txtxpos , $txtypos + $slimheight , 2 * $txtwidth , $slimheight )
- If IniRead( $inifilename , $ini_section_misc , $misc_token_skipdownload , $disabled ) = $enabled Then GUICtrlSetState( -1 , $GUI_DISABLE )
- If IniRead( $inifilename , $ini_section_misc , $misc_token_showshutdown , $disabled ) = $disabled Then GUICtrlSetState( -1 , $GUI_HIDE )
- ; Proxy Button
- $txtxpos = 2 * $txtxoffset + $groupwidth / 2 - $btnwidth
- $btn_proxy = GUICtrlCreateButton( 'Proxy...' , $txtxpos , $txtypos , $btnwidth , $btnheight )
- GUICtrlSetResizing( -1 , $GUI_DOCKBOTTOM )
- $proxy = IniRead( $inifilename , $ini_section_misc , $misc_token_proxy , '' )
- ; WSUS Button
- $txtxpos = 2 * $txtxoffset + $groupwidth / 2
- $btn_wsus = GUICtrlCreateButton( 'WSUS...' , $txtxpos , $txtypos , $btnwidth , $btnheight )
- GUICtrlSetResizing( -1 , $GUI_DOCKBOTTOM )
- If IniRead( $inifilename , $ini_section_misc , $misc_token_skipdownload , $disabled ) = $enabled OR _
- IniRead( $inifilename , $ini_section_misc , $misc_token_skipdynamic , $disabled ) = $enabled Then
- GUICtrlSetState( -1 , $GUI_DISABLE )
- EndIf
- $wsus = IniRead( $inifilename , $ini_section_misc , $misc_token_wsus , '' )
- ; Donate Button
- $txtxpos = 2.5 * $txtxoffset + 3 * $groupwidth / 4 - $btnwidth / 2
- $btn_donate = GUICtrlCreateButton( ShowGUIInGerman() ? 'Spenden...' : 'Donate...' , $txtxpos , $txtypos , $btnwidth , $btnheight )
- GUICtrlSetResizing( -1 , $GUI_DOCKBOTTOM )
- If IniRead( $inifilename , $ini_section_misc , $misc_token_showdonate , $enabled ) = $disabled Then GUICtrlSetState( -1 , $GUI_HIDE )
- ; Exit Button
- $txtxpos = 3 * $txtxoffset + $groupwidth - $btnwidth
- $btn_exit = GUICtrlCreateButton( ShowGUIInGerman() ? 'Ende' : 'Exit' , $txtxpos , $txtypos , $btnwidth , $btnheight )
- GUICtrlSetResizing( -1 , $GUI_DOCKRIGHT + $GUI_DOCKBOTTOM )
- #EndRegion
- ; Update Windows Controls
- For $ii = 1 To $aMainArray[0][0]
- If $aMainArray[$ii][1] <> '' Then
- $aWinCtrSplit = StringSplit( $aMainArray[$ii][1] , '|' )
- For $jj = 1 To $aWinCtrSplit[0]
- $sCurrentVar1 = Eval( StringReplace( $aWinCtrSplit[$jj] & ' ' & $aMainArray[$ii][0] , ' ' , '_' ))
- $sCurrentVar2 = Eval( StringReplace( 'ini section ' & $aWinCtrSplit[$jj] , ' ' , '_' ))
- $sCurrentVar3 = Eval( 'lang_token_' & $aMainArray[$ii][0] )
- If StringInStr( 'ell|ara|heb|dan|nor|fin' , $aMainArray[$ii][0] ) > 0 Then
- GUICtrlSetData( $sCurrentVar1 , LanguageCaption( $sCurrentVar3 , ShowGUIInGerman()))
- GUICtrlSetState( $sCurrentVar1 , $GUI_UNCHECKED )
- GUICtrlSetState( $sCurrentVar1 , $GUI_DISABLE )
- ElseIf $aMainArray[$ii][0] = 'glb' Then
- If StringInStr( $aWinCtrSplit[$jj] , 'x64' ) > 0 Then
- $glb_label = ( ShowGUIInGerman() ? 'x64 Global (mehrsprachige updates)' : 'x64 Global (multilingual updates)' )
- Else
- $glb_label = ( ShowGUIInGerman() ? 'x86 Global (mehrsprachige updates)' : 'x86 Global (multilingual updates)' )
- EndIf
- GUICtrlSetData( $sCurrentVar1 , $glb_label )
- If IniRead( $inifilename , $sCurrentVar2 , $sCurrentVar3 , $disabled ) = $enabled Then
- GUICtrlSetState( $sCurrentVar1 , $GUI_CHECKED )
- EndIf
- Else
- GUICtrlSetData( $sCurrentVar1 , LanguageCaption( $sCurrentVar3 , ShowGUIInGerman()))
- If IniRead( $inifilename , $sCurrentVar2 , $sCurrentVar3 , $disabled ) = $enabled Then
- GUICtrlSetState( $sCurrentVar1 , $GUI_CHECKED )
- EndIf
- EndIf
- Next
- EndIf
- Next
- ; Update Office Controls
- For $ii = 1 To $aMainArray[0][0]
- If $aMainArray[$ii][2] <> '' Then
- $aOffCtrSplit = StringSplit( $aMainArray[$ii][2] , '|' )
- For $jj = 1 To $aOffCtrSplit[0]
- $sCurrentVar = StringReplace( $aOffCtrSplit[$jj] & ' ' & $aMainArray[$ii][0] , ' ' , '_' )
- GUICtrlSetData( Eval( $sCurrentVar ) , LanguageCaption( Eval( 'lang_token_' & $aMainArray[$ii][0] ) , ShowGUIInGerman()))
- If IniRead( $inifilename , Eval( 'ini_section_' & $aOffCtrSplit[$jj] ) , Eval( 'lang_token_' & $aMainArray[$ii][0] ) , $disabled ) = $enabled Then
- GUICtrlSetState( Eval( $sCurrentVar ) , $GUI_CHECKED )
- EndIf
- Next
- EndIf
- Next
- ; GUI Message Loop
- GUISetState()
- If IsUNCPath( @ScriptDir ) Then
- If ShowGUIInGerman() Then
- $sMsgBoxTitle = 'Fehler'
- $sMsgBoxText = 'Das Skript wurde von einem UNC-Pfad gestartet.' & @LF & _
- 'Bitte weisen Sie der Netzwerkfreigabe einen Laufwerksbuchstaben zu.'
- Else
- $sMsgBoxTitle = 'Error'
- $sMsgBoxText = 'The script was started from a UNC path.' & @LF & _
- 'Please map a drive letter to the network share.'
- EndIf
- MsgBox( 0x2010 , $sMsgBoxTitle , $sMsgBoxText )
- Exit(1)
- EndIf
- If NOT PathValid( @ScriptDir ) Then
- If ShowGUIInGerman() Then
- $sMsgBoxTitle = 'Fehler'
- $sMsgBoxText = 'Der Skript-Pfad darf nicht mehr als ' & $path_max_length & ' Zeichen lang sein und' & @LF & _
- 'darf keines der folgenden Zeichen enthalten: ' & $path_invalid_chars
- Else
- $sMsgBoxTitle = 'Error'
- $sMsgBoxText = 'The script path must not be more than ' & $path_max_length & ' characters long and' & @LF & _
- 'must not contain any of the following characters: ' & $path_invalid_chars
- EndIf
- MsgBox( 0x2010 , $sMsgBoxTitle , $sMsgBoxText )
- Exit(1)
- EndIf
- If NOT PathValid( @TempDir ) Then
- If ShowGUIInGerman() Then
- $sMsgBoxTitle = 'Fehler'
- $sMsgBoxText = 'Der %TEMP%-Pfad darf nicht mehr als ' & $path_max_length & ' Zeichen lang sein und' & @LF & _
- 'darf keines der folgenden Zeichen enthalten: ' & $path_invalid_chars
- Else
- $sMsgBoxTitle = 'Error'
- $sMsgBoxText = 'The %TEMP% path must not be more than ' & $path_max_length & ' characters long and' & @LF & _
- 'must not contain any of the following characters: ' & $path_invalid_chars
- EndIf
- MsgBox( 0x2010 , $sMsgBoxTitle , $sMsgBoxText )
- Exit(1)
- EndIf
- If StringRight( EnvGet( 'TEMP' ) , 1 ) = '\' Then
- If ShowGUIInGerman() Then
- $sMsgBoxTitle = 'Fehler'
- $sMsgBoxText = 'Der %TEMP%-Pfad enthält einen abschließenden Backslash "\".'
- Else
- $sMsgBoxTitle = 'Error'
- $sMsgBoxText = 'The %TEMP% path contains a trailing backslash "\".'
- EndIf
- MsgBox( 0x2010 , $sMsgBoxTitle , $sMsgBoxText )
- Exit(1)
- EndIf
- If NOT DirectoryStructureExists() Then
- If ShowGUIInGerman() Then
- $sMsgBoxTitle = 'Fehler'
- $sMsgBoxText = 'Die Verzeichnisstruktur ist unvollständig.' & @LF & _
- 'Bitte behalten Sie diese beim Entpacken des Zip-Archivs bei.'
- Else
- $sMsgBoxTitle = 'Error'
- $sMsgBoxText = 'The directory structure is incomplete.' & @LF & _
- 'Please keep it when you unpack the Zip archive.'
- EndIf
- MsgBox( 0x2010 , $sMsgBoxTitle , $sMsgBoxText )
- Exit(1)
- EndIf
- While 1
- Switch GUIGetMsg()
- ; Window Closed
- Case $GUI_EVENT_CLOSE
- ExitLoop
- ; Exit Button Pressed
- Case $btn_exit
- ExitLoop
- ; 'Include Service Packs' Check Box Toggled
- Case $includesp
- If NOT IsCheckBoxChecked( $includesp ) AND IniRead( $inifilename , $ini_section_opts , $opts_token_cleanup , $enabled ) = $enabled Then
- If ShowGUIInGerman() Then
- $sMsgBoxTitle = 'Warnung'
- $sMsgBoxText = 'Durch die Option "Service-Packs ausschließen" werden bereits' & @LF & _
- 'heruntergeladene Service Packs für die selektierten Produkte gelöscht.' & @LF & _
- 'Möchten Sie fortsetzen?'
- Else
- $sMsgBoxTitle = 'Warning'
- $sMsgBoxText = 'The option "Exclude Service Packs" will delete previously' & @LF & _
- 'downloaded Service Packs for the selected products.' & @LF & _
- 'Do you wish to proceed?'
- EndIf
- If MsgBox( 0x2134 , $sMsgBoxTitle , $sMsgBoxText ) = $msgbox_btn_no Then GUICtrlSetState( $includesp , $GUI_CHECKED )
- EndIf
- ; CD ISO Image Button Pressed
- Case $cdiso
- If IsCheckBoxChecked( $cdiso ) OR IsCheckBoxChecked( $dvdiso ) OR IsCheckBoxChecked( $usbcopy ) Then
- GUICtrlSetState( $imageonly , $GUI_ENABLE )
- Else
- GUICtrlSetState( $imageonly , $GUI_UNCHECKED + $GUI_DISABLE )
- If IniRead( $inifilename , $ini_section_misc , $misc_token_skipdownload , $disabled ) = $disabled Then
- GUICtrlSetState( $verifydownloads , $GUI_ENABLE )
- GUICtrlSetState( $shutdown , $GUI_ENABLE )
- EndIf
- EndIf
- ; DVD ISO Image Button Pressed
- Case $dvdiso
- If IsCheckBoxChecked( $cdiso ) OR IsCheckBoxChecked( $dvdiso ) OR IsCheckBoxChecked( $usbcopy ) Then
- GUICtrlSetState( $imageonly , $GUI_ENABLE )
- Else
- GUICtrlSetState( $imageonly , $GUI_UNCHECKED + $GUI_DISABLE )
- If IniRead( $inifilename , $ini_section_misc , $misc_token_skipdownload , $disabled ) = $disabled Then
- GUICtrlSetState( $verifydownloads , $GUI_ENABLE )
- GUICtrlSetState( $shutdown , $GUI_ENABLE )
- EndIf
- EndIf
- ; USB Copy Button Pressed
- Case $usbcopy
- If IsCheckBoxChecked( $usbcopy ) Then
- GUICtrlSetState( $usbpath , $GUI_ENABLE )
- GUICtrlSetState( $usbfsf , $GUI_ENABLE )
- GUICtrlSetState( $usbclean , $GUI_ENABLE )
- Else
- GUICtrlSetState( $usbpath , $GUI_DISABLE )
- GUICtrlSetState( $usbfsf , $GUI_DISABLE )
- GUICtrlSetState( $usbclean , $GUI_DISABLE )
- EndIf
- If IsCheckBoxChecked( $cdiso ) OR IsCheckBoxChecked( $dvdiso ) OR IsCheckBoxChecked( $usbcopy ) Then
- GUICtrlSetState( $imageonly , $GUI_ENABLE )
- Else
- GUICtrlSetState( $imageonly , $GUI_UNCHECKED + $GUI_DISABLE )
- If IniRead( $inifilename , $ini_section_misc , $misc_token_skipdownload , $disabled ) = $disabled Then
- GUICtrlSetState( $verifydownloads , $GUI_ENABLE )
- GUICtrlSetState( $shutdown , $GUI_ENABLE )
- EndIf
- EndIf
- ; FSF Button Pressed
- Case $usbfsf
- If ShowGUIInGerman() Then
- $FileSelectText = 'Wählen Sie das Zielverzeichnis:'
- Else
- $FileSelectText = 'Choose target directory:'
- EndIf
- $dummy = FileSelectFolder( $FileSelectText , '' , 1 , GUICtrlRead( $usbpath ))
- If FileExists( $dummy ) Then GUICtrlSetData( $usbpath , $dummy )
- ; 'Clean up target directory' Check Box Toggled
- Case $usbclean
- If IsCheckBoxChecked( $usbclean ) Then
- If ShowGUIInGerman() Then
- $sMsgBoxTitle = 'Warnung'
- $sMsgBoxText = 'Durch die Option "Zielverzeichnis bereinigen"' & @LF & _
- 'werden dort bereits existierende Dateien gelöscht.' & @LF & _
- 'Möchten Sie fortsetzen?'
- Else
- $sMsgBoxTitle = 'Warning'
- $sMsgBoxText = 'The option "Clean up target directory"' & @LF & _
- 'will delete existing files there.' & @LF & _
- 'Do you wish to proceed?'
- EndIf
- If MsgBox( 0x2134 , $sMsgBoxTitle , $sMsgBoxText ) = $msgbox_btn_no Then GUICtrlSetState( $usbclean , $GUI_UNCHECKED )
- EndIf
- ; Image Only Checkbox Toggled
- Case $imageonly
- If IsCheckBoxChecked( $imageonly ) Then
- If ShowGUIInGerman() Then
- $sMsgBoxTitle = 'Warnung'
- $sMsgBoxText = 'Durch diese Option verhindern Sie das Herunterladen aktueller Updates.' & @LF & _
- 'Dies kann ein erhöhtes Sicherheitsrisiko für das Zielsystem bedeuten.' & @LF & _
- 'Möchten Sie fortsetzen?'
- Else
- $sMsgBoxTitle = 'Warning'
- $sMsgBoxText = 'This option prevents downloading of recent updates.' & @LF & _
- 'This may increase security risks for the target system.' & @LF & _
- 'Do you wish to proceed?'
- EndIf
- If MsgBox( 0x2134 , $sMsgBoxTitle , $sMsgBoxText ) = $msgbox_btn_no Then
- GUICtrlSetState( $imageonly , $GUI_UNCHECKED )
- Else
- GUICtrlSetState( $verifydownloads , $GUI_DISABLE )
- GUICtrlSetState( $shutdown , $GUI_UNCHECKED + $GUI_DISABLE )
- EndIf
- Else
- If IniRead( $inifilename , $ini_section_misc , $misc_token_skipdownload , $disabled ) = $disabled Then
- GUICtrlSetState( $verifydownloads , $GUI_ENABLE )
- GUICtrlSetState( $shutdown , $GUI_ENABLE )
- EndIf
- EndIf
- ; Proxy Button Pressed
- Case $btn_proxy
- If ShowGUIInGerman() Then
- $sInputBoxTitle = 'HTTP-Proxy-Einstellung'
- $sInputBoxText = 'ACHTUNG: Sonderzeichen müssen hier gemäß RFC1738 codiert werden.' & @LF & _
- 'Um die Speicherung Ihres Passworts zu vermeiden,' & @LF & _
- 'lassen Sie es hier bitte weg (http://Benutzername:@Server[:Port]).' & @LF & @LF & _
- 'Bitte geben Sie Ihre HTTP-Proxy-URL ein' & @LF & _
- '(http://[Benutzername:[Passwort]@]Server[:Port]):'
- Else
- $sInputBoxTitle = 'HTTP Proxy setting'
- $sInputBoxText = 'NOTE: Special characters have to be encoded according to RFC1738 here.' & @LF & _
- 'To avoid storage of your password, please omit it here' & @LF & _
- '(http://username:@server[:port]).' & @LF & @LF & _
- 'Please enter your HTTP Proxy URL' & @LF & _
- '(http://[username:[password]@]server[:port]):'
- EndIf
- $dummy = InputBox( $sInputBoxTitle , $sInputBoxText , $proxy , '' , 420 )
- If @error = 0 AND $proxy <> $dummy Then
- $proxy = $dummy
- $proxypwd = ""
- EndIf
- ; WSUS Button Pressed
- Case $btn_wsus
- If ShowGUIInGerman() Then
- $sInputBoxTitle = 'WSUS-Einstellung'
- $sInputBoxText = 'Bitte geben Sie Ihre WSUS-URL ein' & @LF & '(http://server):'
- Else
- $sInputBoxTitle = 'WSUS setting'
- $sInputBoxText = 'Please enter your WSUS URL' & @LF & '(http://server):'
- EndIf
- $dummy = InputBox( $sInputBoxTitle , $sInputBoxText , $wsus , '' , 220 )
- If @error = 0 Then
- $wsus = $dummy
- EndIf
- ; Donate Button Pressed
- Case $btn_donate
- ShellExecute( $donationURL )
- ; Start Button Pressed
- Case $btn_start
- $runany = False
- If NOT IsCheckBoxChecked( $imageonly ) Then
- If StringInStr( $proxy , ':@' ) > 0 AND $proxypwd = '' Then
- If ShowGUIInGerman() Then
- $sInputBoxTitle = 'HTTP-Proxy-Passwort'
- $sInputBoxText = 'ACHTUNG: Bitte codieren Sie Sonderzeichen hier nicht.' & @LF & _
- 'Dies geschieht automatisch.' & @LF & @LF & _
- 'Bitte geben Sie Ihr HTTP-Proxy-Passwort ein:'
- Else
- $sInputBoxTitle = 'HTTP Proxy password'
- $sInputBoxText = 'NOTE: Please do not encode special characters here.' & @LF & _
- 'This will be done automatically.' & @LF & @LF & _
- 'Please enter your HTTP Proxy password:'
- EndIf
- $dummy = InputBox( $sInputBoxTitle , $sInputBoxText , '' , '*' , 300 )
- If @error = 0 Then
- $proxypwd = RFC1738EncodedString( $dummy )
- Else
- ContinueLoop
- EndIf
- EndIf
- If IniRead( $inifilename , $ini_section_misc , $misc_token_chkver , $enabled ) = $enabled Then
- Switch RunVersionCheck( AuthProxy( $proxy , $proxypwd ))
- ; Yes
- Case -1
- RunSelfUpdate( AuthProxy( $proxy , $proxypwd ))
- ExitLoop
- ; Cancel / Close
- Case 1
- ContinueLoop
- EndSwitch
- EndIf
- EndIf
- If IniRead( $inifilename , $ini_section_misc , $misc_token_wsus_trans , $disabled ) = $enabled AND $wsus <> '' Then
- IniWrite( ClientIniFileName() , $ini_section_misc , $misc_token_clt_wustat , $wsus )
- Else
- IniDelete( ClientIniFileName() , $ini_section_misc , $misc_token_clt_wustat )
- EndIf
- If IniRead( $inifilename , $ini_section_misc , $misc_token_minimize , $disabled ) = $enabled Then
- WinSetState( $maindlg , $maindlg , @SW_MINIMIZE )
- EndIf
- ; Windows Downloads
- For $ii = 1 To $aMainArray[0][0]
- If $aMainArray[$ii][1] <> '' Then
- $aBtnWinSplit = StringSplit( $aMainArray[$ii][1] , '|' )
- For $jj = 1 To $aBtnWinSplit[0]
- If StringInStr( $aBtnWinSplit[$jj] , 'w2k3' ) > 0 AND StringInStr( 'ell|ara|heb|dan|nor|fin' , $aMainArray[$ii][0] ) > 0 Then ContinueLoop
- $sCurrentVar1 = StringReplace( $aBtnWinSplit[$jj] & ' ' & $aMainArray[$ii][0] , ' ' , '_' )
- $sCurrentVar2 = StringReplace( $aBtnWinSplit[$jj] , ' ' , '-' ) & ' ' & $aMainArray[$ii][0]
- If IsCheckBoxChecked( Eval( $sCurrentVar1 )) Then
- 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
- ContinueLoop 3
- EndIf
- EndIf
- Next
- EndIf
- Next
- ; Office Global Downloads
- If IsLangOfficeChecked() Then
- 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
- ContinueLoop
- EndIf
- EndIf
- ; Office Downloads
- For $ii = 1 To $aMainArray[0][0]
- If $aMainArray[$ii][2] <> '' Then
- $aBtnOffSplit = StringSplit( $aMainArray[$ii][2] , '|' )
- For $jj = 1 To $aBtnOffSplit[0]
- $sCurrentVar = StringReplace( $aBtnOffSplit[$jj] & ' ' & $aMainArray[$ii][0] , ' ' , '_' )
- If IsCheckBoxChecked( Eval( $sCurrentVar )) Then
- If RunScripts( $aBtnOffSplit[$jj] & ' ' & $aMainArray[$ii][0] , IsCheckBoxChecked( $imageonly ) , DetermineDownloadSwitches( $includesp , $dotnet , $wle , $msse , $wddefs , $verifydownloads , AuthProxy( $proxy , $proxypwd ) , $wsus ) , False , DetermineISOSwitches( $includesp , $dotnet , $wle , $msse , $wddefs , $usbclean ) , False , GUICtrlRead( $usbpath )) <> 0 Then
- ContinueLoop 3
- EndIf
- EndIf
- Next
- EndIf
- Next
- ; Office Language Specific Downloads
- For $ii = 1 To $aMainArray[0][0]
- If $aMainArray[$ii][2] <> '' Then
- $aOffLangSplit = StringSplit( $aMainArray[$ii][2] , '|' )
- For $jj = 1 To $aOffLangSplit[0]
- $sCurrentVal = StringReplace( $aOffLangSplit[$jj] & ' ' & $aMainArray[$ii][0] , ' ' , '_' )
- If IsCheckBoxChecked( Eval( $sCurrentVal )) Then
- 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
- ContinueLoop 3
- EndIf
- EndIf
- Next
- EndIf
- Next
- ; Create Cross-Platform DVD ISO Images
- If IsCheckBoxChecked( $dvdiso ) Then
- ; Windows Server 2003
- For $ii = 1 To $aMainArray[0][0]
- If StringInStr( $aMainArray[$ii][1] , 'w2k3' ) = 0 Then ContinueLoop
- If IsCheckBoxChecked( Eval( 'w2k3_' & $aMainArray[$ii][0] )) Then
- If RunISOCreationScript( Eval( 'lang_token_' & $aMainArray[$ii][0] ) , DetermineISOSwitches( $includesp , $dotnet , $wle , $msse , $wddefs , $usbclean )) <> 0 Then
- ContinueLoop 2
- EndIf
- EndIf
- Next
- ; Office
- For $ii = 1 To $aMainArray[0][0]
- If $aMainArray[$ii][2] <> '' Then
- $aOffIsoSplit = StringSplit( $aMainArray[$ii][2] , '|' )
- For $jj = 1 To $aOffIsoSplit[0]
- $sCurrentVal = StringReplace( $aOffIsoSplit[$jj] & ' ' & $aMainArray[$ii][0] , ' ' , '_' )
- If IsCheckBoxChecked( Eval( $sCurrentVal )) Then
- If RunISOCreationScript( Eval( 'lang_token_' & $aMainArray[$ii][0] ) , DetermineISOSwitches( $includesp , $dotnet , $wle , $msse , $wddefs , $usbclean )) <> 0 Then
- ContinueLoop 3
- EndIf
- EndIf
- Next
- EndIf
- Next
- EndIf
- ; Restore Window And Show Success Dialog
- WinSetState( $maindlg , $maindlg , @SW_RESTORE )
- If $runany Then
- If IsCheckBoxChecked( $scripting ) Then
- If ShowGUIInGerman() Then
- $sMsgBoxText = 'Sammelskript "' & @ScriptDir & '\cmd\custom\RunAll.cmd" erstellt.' & @LF & _
- 'Möchten Sie das Skript nun prüfen?'
- Else
- $sMsgBoxText = 'Collection script "' & @ScriptDir & '\cmd\custom\RunAll.cmd" created.' & @LF & _
- 'Would you like to check the script now?'
- EndIf
- If MsgBox( 0x2044 , 'Info' , $sMsgBoxText ) = $msgbox_btn_yes Then ShowRunAll()
- Else
- If IsCheckBoxChecked( $shutdown ) Then
- Run( @SystemDir & '\shutdown.exe /s /f /t 5' , '' , @SW_HIDE )
- ExitLoop
- EndIf
- If IsCheckBoxChecked( $imageonly ) Then
- If ShowGUIInGerman() Then
- $sMsgBoxText = 'Image-Erstellung / Kopieren erfolgreich.'
- Else
- $sMsgBoxText = 'Image creation / copying successful.'
- EndIf
- MsgBox( 0x2040 , 'Info' , $sMsgBoxText )
- Else
- If ShowGUIInGerman() Then
- $sMsgBoxText = 'Herunterladen / Image-Erstellung / Kopieren erfolgreich.' & @LF & _
- 'Möchten Sie nun die Protokolldatei auf mögliche Warnungen prüfen?'
- Else
- $sMsgBoxText = 'Download / image creation / copying successful.' & @LF & _
- 'Would you like to check the log file for possible warnings now?'
- EndIf
- If MsgBox( 0x2044 , 'Info' , $sMsgBoxText ) = $msgbox_btn_yes Then ShowLogFile()
- EndIf
- EndIf
- Else
- If ShowGUIInGerman() Then
- $sMsgBoxText = 'Nichts zu tun!'
- Else
- $sMsgBoxText = 'Nothing to do!'
- EndIf
- MsgBox( 0x2040 , 'Info' , $sMsgBoxText )
- EndIf
- EndSwitch
- WEnd
- SaveSettings()
- Exit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement