Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Func _audioManager()
- MsgBox(266304, "Audio Manager", "Teste die Audio-Funktionalität und Starte die Audio-Tool.", 0)
- ; Set volume to 100% (Windows actually does 2 steps increments for the volume)
- Local $i = 0
- While $i <= 50
- Send("{VOLUME_UP}", 0)
- $i = $i + 1
- WEnd
- ; Sets the system wave volume to 100%. This controls the Wave volume, not the master volume control. Also, a value of Zero does not set mute status.
- SoundSetWaveVolume(100)
- ; Play one of the default sytem sounds
- SoundPlay(@WindowsDir & "\media\tada.wav", 1)
- ; Set volume from 100% to 50%
- Local $i = 0
- While $i <= 25
- Send("{VOLUME_Down}", 0)
- $i = $i + 1
- WEnd
- ; Sets the system wave volume to 100%. This controls the Wave volume, not the master volume control. Also, a value of Zero does not set mute status.
- SoundSetWaveVolume(100)
- ; Play one of the default sytem sounds
- SoundPlay(@WindowsDir & "\media\tada.wav", 1)
- ; Set volume to 100% (Windows actually does 2 steps increments for the volume)
- Local $i = 0
- While $i <= 50
- Send("{VOLUME_UP}", 0)
- $i = $i + 1
- WEnd
- If @OSArch = "X86" Then
- ;insert X86 files after this
- $ProgramFileDir = "Program Files (x86)"
- MsgBox(266304, "Starte Audio Tools", "Audio Tools für " & @OSArch & " wird gestartet", 0)
- $realtek = @HomeDrive & "\" & $ProgramFileDir & "\Realtek\Audio\HDA\RAVCpl64.exe"
- $realtek2 = @HomeDrive & "\" & $ProgramFileDir & "\Realtek\Audio\AP\RtkNGUI.exe"
- $smartaudio = @HomeDrive & "\" & $ProgramFileDir & "\CONEXANT\SAII\SmartAudio.exe"
- $ifileexistsrealtek = FileExists($realtek)
- $ifileexistsrealtek2 = FileExists($realtek2)
- $ifileexistssmartaudio = FileExists($smartaudio)
- If $ifileexistsrealtek Then
- ShellExecute($realtek)
- ElseIf $ifileexistsrealtek2 Then
- ShellExecute($realtek2)
- ElseIf $ifileexistssmartaudio Then
- ShellExecute($smartaudio)
- Else
- MsgBox(48, "Nicht vorhanden", "Audio Tools möglichweise nicht installiert !", 0)
- EndIf
- ElseIf @OSArch = "X64" Then
- $ProgramFileDir = "Program Files"
- MsgBox(266304, "Starte Audio Tools", "Audio Tools für " & @OSArch & " wird gestartet", 0)
- $realtek = @HomeDrive & "\" & $ProgramFileDir & "\Realtek\Audio\HDA\RAVCpl64.exe"
- $realtek2 = @HomeDrive & "\" & $ProgramFileDir & "\Realtek\Audio\AP\RtkNGUI.exe"
- $smartaudio = @HomeDrive & "\" & $ProgramFileDir & "\CONEXANT\SAII\SmartAudio.exe"
- $ifileexistsrealtek = FileExists($realtek)
- $ifileexistsrealtek2 = FileExists($realtek2)
- $ifileexistssmartaudio = FileExists($smartaudio)
- If $ifileexistsrealtek Then
- ShellExecute($realtek)
- ElseIf $ifileexistsrealtek2 Then
- ShellExecute($realtek2)
- ElseIf $ifileexistssmartaudio Then
- ShellExecute($smartaudio)
- Else
- MsgBox(48, "Nicht vorhanden", "Audio Tools möglichweise nicht installiert !", 0)
- EndIf
- Else
- $ProgramFileDir = "Program Files"
- MsgBox(266304, "Starte Audio Tools", "Audio Tools für " & @OSArch & " wird gestartet", 0)
- ;insert x64 files after this
- $realtek = @HomeDrive & "\" & $ProgramFileDir & "\Realtek\Audio\HDA\RAVCpl64.exe"
- $realtek2 = @HomeDrive & "\" & $ProgramFileDir & "\Realtek\Audio\AP\RtkNGUI.exe"
- $smartaudio = @HomeDrive & "\" & $ProgramFileDir & "\CONEXANT\SAII\SmartAudio.exe"
- $ifileexistsrealtek = FileExists($realtek)
- $ifileexistsrealtek2 = FileExists($realtek2)
- $ifileexistssmartaudio = FileExists($smartaudio)
- If $ifileexistsrealtek Then
- ShellExecute($realtek)
- ElseIf $ifileexistsrealtek2 Then
- ShellExecute($realtek2)
- ElseIf $ifileexistssmartaudio Then
- ShellExecute($smartaudio)
- Else
- MsgBox(48, "Nicht vorhanden", "Audio Tools möglichweise nicht installiert !", 0)
- EndIf
- EndIf
- EndFunc ;==>_audioManager
- Func _GetBIOSInfo()
- Local $objWMI, $colItems, $objItem
- Local $sBIOSVersion, $sSerialNumber
- Local $aReturn[3]
- Local $sModelName = '', $sVersion = '' ; Werte aus $sBIOSVersion
- Local $iPos
- $objWMI = ObjGet("winmgmts:{impersonationLevel=impersonate}!\\" & @ComputerName & "\root\cimv2")
- $colItems = $objWMI.ExecQuery("SELECT * FROM Win32_BIOS", "WQL", 0x10 + 0x20)
- If IsObj($colItems) Then
- For $objItem In $colItems
- $sBIOSVersion = "X751SA.705" ;$objItem.SMBIOSBIOSVersion
- $sManufacturer = $objItem.Manufacturer
- $sSerialNumber = StringReplace(StringReplace($objItem.SerialNumber, "SSN12345678901234567", "Nicht vorhanden !"), "na", "Nicht vorhanden !")
- ; ModelName und Version aus $sBIOSVersion ermitteln :
- ; ----------------------------------------------------
- ; Prüfen, ob in $sBIOSVersion ein Punkt vorkommt, also z.B. X751SA.705
- ; Falls ja :
- ; -> String von hinten auswerten, und beim ersten Vorkommen aufteilen
- ; Falls nicht :
- ; -> $sModelName mit $sBIOSVersion besetzen
- ; -> damit ist $sModelName zwar identisch wie $sBIOSVersion, aber egal.
- ; -> $sVersion leerlassen
- $iPos = StringInStr($sBIOSVersion, '.', 0, -1)
- If $iPos > 0 Then
- $sModelName = StringLeft($sBIOSVersion, $iPos - 1)
- $sVersion = StringRight($sBIOSVersion, StringLen($sBIOSVersion) - $iPos)
- Else
- $sModelName = $sBIOSVersion
- EndIf
- ; Rückgabearray besetzen :
- $aReturn[0] = $sSerialNumber
- $aReturn[1] = $sModelName
- $aReturn[2] = $sVersion
- Return $aReturn
- Next
- Else
- SetError(1)
- EndIf
- EndFunc ;==>_GetBIOSInfo
- Func _BiosCheck($bios, $model)
- $sFile = @WorkingDir & "WTP\finaltest\NB_BIOS.txt"
- $sRead = FileRead($sFile)
- $aString = StringRegExp($sRead, $model & " = (.*)", 3)
- If Not ($bios = $aString[0]) Then
- $bios_check = MsgBox(52, "Bios Version Check", "Bios aktualisieren" & @CRLF & "AKTUELL: " & $bios & @CRLF & "NEU: " & $aString[0] & @CRLF & "WinFlash ausführen ?", 0)
- Switch $bios_check
- Case 6
- MsgBox(52, "the link is:", $aString[0])
- Case 7
- Case 2
- EndSwitch
- EndIf
- EndFunc ;==>_BiosCheck
- Func _kbbacklightflash()
- If @OSArch = "X86" Then
- $kbbb = MsgBox(4132, "Keyboard Backlight Flasher " & @CPUArch, "Soll das Keyboard Backlight auf " & @CPUArch & " Ebene geflasht werden?", 0)
- Switch $kbbb
- Case 6 ;YES
- ShellExecute(@WorkingDir & "WTP\finaltest\kbBacklightFlash.bat.lnk")
- Case 7 ;NO
- ;Your code here...
- EndSwitch
- ElseIf @OSArch = "X64" Then
- $kbbb = MsgBox(4132, "Keyboard Backlight Flasher " & @CPUArch, "Soll das Keyboard Backlight auf " & @CPUArch & " Ebene geflasht werden?", 0)
- Switch $kbbb
- Case 6 ;YES
- ShellExecute(@WorkingDir & "WTP\finaltest\kbBacklightFlash64.bat.lnk")
- Case 7 ;NO
- ;Your code here...
- EndSwitch
- Else
- $kbbb = MsgBox(4132, "Keyboard Backlight Flasher " & @CPUArch, "Soll das Keyboard Backlight auf " & @CPUArch & " Ebene geflasht werden?", 0)
- Switch $kbbb
- Case 6 ;YES
- ShellExecute(@WorkingDir & "WTP\finaltest\kbBacklightFlash64.bat.lnk")
- Case 7 ;NO
- ;Your code here...
- EndSwitch
- EndIf
- EndFunc ;==>_kbbacklightflash
- Func _findkeydef()
- $keydefus = @WorkingDir & "WTP\asus-wtp\bin\keydef\keydef" & $getModelName & "us.ini"
- $keydefeu = @WorkingDir & "WTP\asus-wtp\bin\keydef\keydef" & $getModelName & "eu.ini"
- $ifileexistsus = FileExists($keydefus)
- $ifileexistseu = FileExists($keydefeu)
- If $ifileexistsus Then
- _WinAPI_ShellOpenFolderAndSelectItems($keydefus)
- ShellExecute($keydefus)
- ElseIf $ifileexistseu Then
- _WinAPI_ShellOpenFolderAndSelectItems($keydefeu)
- ShellExecute($keydefeu)
- Else
- MsgBox(16, "Nicht vorhanden", "Es wurde kein Keyboard-Layout gefunden! " & $getModelName, 0)
- EndIf
- EndFunc ;==>_findkeydef
- Func _fixbios()
- $comparefix = MsgBox(36, "Bios-Fix", "Möchtest du den Bios-Compare-Fix durchführen?", 0)
- Switch $comparefix
- Case 6 ;YES
- $rc = FileCopy(@WorkingDir & "WTP\finaltest\NB_BIOS.txt", @WorkingDir & "WTP\asus-wtp\bin\conf\", 1)
- If $rc > 0 Then
- MsgBox(64, "Erfolgreich", "Bios-Compare-Fix wurde erfolgreich durchgeführt!", 0)
- Else
- MsgBox(16, "Fehler", "Bios-Compare-Fix konnte nicht durchgeführt werden!", 0)
- EndIf
- Case 7 ;NO
- ;Your code here...
- EndSwitch
- EndFunc ;==>_fixbios
- Func _BiosCheat()
- $biosfile = @WorkingDir & "WTP\asus-wtp\bin\conf\NB_BIOS.txt"
- $ifileexist = FileExists($biosfile)
- If $ifileexist Then
- _WinAPI_ShellOpenFolderAndSelectItems($biosfile)
- ShellExecute($biosfile)
- Else
- $comparefix = MsgBox(20, "Nicht vorhanden", "Es wurde kein Bios-File gefunden? Soll der Compare-Fix ausgeführt werden?", 0)
- Switch $comparefix
- Case 6 ;YES
- _fixbios()
- Case 7 ;NO
- ;Your code here...
- EndSwitch
- EndIf
- EndFunc ;==>_BiosCheat
- Func _2ndinjection()
- $serial = StringStripWS($getSerial, 8)
- MsgBox(64, "Seriennummer", "Die Seriennummer " & $serial & " wurde in die Zwischenablage kopiert!", 0)
- ClipPut($serial)
- EndFunc ;==>_2ndinjection
- Func _tpInstall()
- $sinstall = MsgBox(49, "Touchpad", "Soll der Touchpad-Treiber nachinstalliert werden?" & @CRLF & "" & @CRLF & "1. Touchpad-Treiber wird zwangsweise deinstalliert." & @CRLF & "2. Touchpad-Treiber wird nachinstalliert." & @CRLF & "" & @CRLF & "Sollte nach der Installation weiterhin keine Reaktion im Touchpad-Test gezeigt werden, einmal das Gerät neustarten.", 0)
- Switch $sinstall
- Case 1 ;OK
- ShellExecute(@WorkingDir & "WTP\finaltest\tp\uninstall.bat.lnk")
- Case 2 ;CANCEL
- ;Your code here...
- EndSwitch
- EndFunc ;==>_tpInstall
- Func _dragsysprepwindow()
- Local $alang[5][2]
- $stext = "(Sysprep)"
- $ifound = _ArraySearch($alang, @OSLang)
- If $ifound <> -1 Then $stext = $alang[$ifound][1]
- WinWait("[CLASS:#32770]", $stext)
- $hwnd = WinGetHandle("[CLASS:#32770]", $stext)
- $apos = WinGetPos($hwnd)
- WinMove($hwnd, "", @DesktopWidth - $apos[2] - 15, @DesktopHeight - $apos[3] - (@DesktopHeight - 267 - 15))
- EndFunc ;==>_dragsysprepwindow
- Func _dragwindowsactivewindow()
- WinWait("[CLASS:#32770; TITLE:WindowsActive]")
- $hwnd = WinGetHandle("[CLASS:#32770; TITLE:WindowsActive]")
- $apos = WinGetPos($hwnd)
- WinMove($hwnd, "", @DesktopWidth - $apos[2] - 15, @DesktopHeight - $apos[3] - (@DesktopHeight - 284 - 267 - 10 - 15))
- EndFunc ;==>_dragwindowsactivewindow
- Func _dragfinaltesttoolswindow()
- WinWait("[TITLE:Final Test Tools v3]")
- $hwnd = WinGetHandle("[TITLE:Final Test Tools v3]")
- $apos = WinGetPos($hwnd)
- WinMove($hwnd, "", @DesktopWidth - $apos[2] - (@DesktopWidth - 430 - 12), @DesktopHeight - $apos[3] - (@DesktopHeight - 499 - 269 - 25))
- EndFunc ;==>_dragfinaltesttoolswindow
Add Comment
Please, Sign In to add comment