Guest User

Untitled

a guest
Oct 18th, 2017
209
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.35 KB | None | 0 0
  1. Func _audioManager()
  2. MsgBox(266304, "Audio Manager", "Teste die Audio-Funktionalität und Starte die Audio-Tool.", 0)
  3.  
  4.  
  5. ; Set volume to 100% (Windows actually does 2 steps increments for the volume)
  6. Local $i = 0
  7. While $i <= 50
  8. Send("{VOLUME_UP}", 0)
  9. $i = $i + 1
  10. WEnd
  11.  
  12. ; 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.
  13. SoundSetWaveVolume(100)
  14.  
  15. ; Play one of the default sytem sounds
  16. SoundPlay(@WindowsDir & "\media\tada.wav", 1)
  17.  
  18. ; Set volume from 100% to 50%
  19. Local $i = 0
  20. While $i <= 25
  21. Send("{VOLUME_Down}", 0)
  22. $i = $i + 1
  23. WEnd
  24.  
  25. ; 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.
  26. SoundSetWaveVolume(100)
  27.  
  28. ; Play one of the default sytem sounds
  29. SoundPlay(@WindowsDir & "\media\tada.wav", 1)
  30.  
  31. ; Set volume to 100% (Windows actually does 2 steps increments for the volume)
  32. Local $i = 0
  33. While $i <= 50
  34. Send("{VOLUME_UP}", 0)
  35. $i = $i + 1
  36. WEnd
  37.  
  38.  
  39. If @OSArch = "X86" Then
  40. ;insert X86 files after this
  41. $ProgramFileDir = "Program Files (x86)"
  42. MsgBox(266304, "Starte Audio Tools", "Audio Tools für " & @OSArch & " wird gestartet", 0)
  43.  
  44. $realtek = @HomeDrive & "\" & $ProgramFileDir & "\Realtek\Audio\HDA\RAVCpl64.exe"
  45. $realtek2 = @HomeDrive & "\" & $ProgramFileDir & "\Realtek\Audio\AP\RtkNGUI.exe"
  46. $smartaudio = @HomeDrive & "\" & $ProgramFileDir & "\CONEXANT\SAII\SmartAudio.exe"
  47. $ifileexistsrealtek = FileExists($realtek)
  48. $ifileexistsrealtek2 = FileExists($realtek2)
  49. $ifileexistssmartaudio = FileExists($smartaudio)
  50. If $ifileexistsrealtek Then
  51. ShellExecute($realtek)
  52. ElseIf $ifileexistsrealtek2 Then
  53. ShellExecute($realtek2)
  54. ElseIf $ifileexistssmartaudio Then
  55. ShellExecute($smartaudio)
  56. Else
  57. MsgBox(48, "Nicht vorhanden", "Audio Tools möglichweise nicht installiert !", 0)
  58. EndIf
  59.  
  60.  
  61. ElseIf @OSArch = "X64" Then
  62. $ProgramFileDir = "Program Files"
  63. MsgBox(266304, "Starte Audio Tools", "Audio Tools für " & @OSArch & " wird gestartet", 0)
  64. $realtek = @HomeDrive & "\" & $ProgramFileDir & "\Realtek\Audio\HDA\RAVCpl64.exe"
  65. $realtek2 = @HomeDrive & "\" & $ProgramFileDir & "\Realtek\Audio\AP\RtkNGUI.exe"
  66. $smartaudio = @HomeDrive & "\" & $ProgramFileDir & "\CONEXANT\SAII\SmartAudio.exe"
  67. $ifileexistsrealtek = FileExists($realtek)
  68. $ifileexistsrealtek2 = FileExists($realtek2)
  69. $ifileexistssmartaudio = FileExists($smartaudio)
  70. If $ifileexistsrealtek Then
  71. ShellExecute($realtek)
  72. ElseIf $ifileexistsrealtek2 Then
  73. ShellExecute($realtek2)
  74. ElseIf $ifileexistssmartaudio Then
  75. ShellExecute($smartaudio)
  76. Else
  77. MsgBox(48, "Nicht vorhanden", "Audio Tools möglichweise nicht installiert !", 0)
  78. EndIf
  79. Else
  80. $ProgramFileDir = "Program Files"
  81. MsgBox(266304, "Starte Audio Tools", "Audio Tools für " & @OSArch & " wird gestartet", 0)
  82. ;insert x64 files after this
  83. $realtek = @HomeDrive & "\" & $ProgramFileDir & "\Realtek\Audio\HDA\RAVCpl64.exe"
  84. $realtek2 = @HomeDrive & "\" & $ProgramFileDir & "\Realtek\Audio\AP\RtkNGUI.exe"
  85. $smartaudio = @HomeDrive & "\" & $ProgramFileDir & "\CONEXANT\SAII\SmartAudio.exe"
  86. $ifileexistsrealtek = FileExists($realtek)
  87. $ifileexistsrealtek2 = FileExists($realtek2)
  88. $ifileexistssmartaudio = FileExists($smartaudio)
  89. If $ifileexistsrealtek Then
  90. ShellExecute($realtek)
  91. ElseIf $ifileexistsrealtek2 Then
  92. ShellExecute($realtek2)
  93. ElseIf $ifileexistssmartaudio Then
  94. ShellExecute($smartaudio)
  95. Else
  96. MsgBox(48, "Nicht vorhanden", "Audio Tools möglichweise nicht installiert !", 0)
  97. EndIf
  98. EndIf
  99.  
  100. EndFunc ;==>_audioManager
  101.  
  102. Func _SystemInfo()
  103. $WMI = ObjGet("winmgmts:{impersonationLevel=impersonate}!\\" & @ComputerName & "\root\cimv2")
  104. $getBIOS = $WMI.ExecQuery("Select * from Win32_BIOS")
  105. $getMODEL = $WMI.ExecQuery("Select * from Win32_ComputerSystem")
  106.  
  107. For $element In $getBIOS
  108. Global $getBiosVersion = $element.SMBIOSBIOSVersion
  109. Local $modelnamegood = StringSplit("1111" & ".DATMODEL", ".")
  110. Global $getModelName = $modelnamegood[2]
  111. Global $getSerial = StringReplace(StringReplace($element.SerialNumber, "SSN12345678901234567", "Nicht vorhanden !"), "na", "Nicht vorhanden !")
  112. Next
  113.  
  114. For $element In $getMODEL
  115. ;~ Global $getModelName = $element.Model
  116. Next
  117. EndFunc ;==>_SystemInfo
  118.  
  119. Func _BiosCheck($bios, $model)
  120. $sFile = @WorkingDir & "WTP\finaltest\NB_BIOS.txt"
  121. $sRead = FileRead($sFile)
  122. $aString = StringRegExp($sRead, $model & " = (.*)", 3)
  123. If Not ($bios = $aString[0]) Then
  124. $bios_check = MsgBox(52, "Bios Version Check", "Bios aktualisieren" & @CRLF & "AKTUELL: " & $bios & @CRLF & "NEU: " & $aString[0] & @CRLF & "WinFlash ausführen ?", 0)
  125. Switch $bios_check
  126. Case 6
  127. MsgBox(52, "the link is:", $aString[0])
  128. Case 7
  129. Case 2
  130. EndSwitch
  131. EndIf
  132. EndFunc ;==>_BiosCheck
  133.  
  134. Func _kbbacklightflash()
  135. If @OSArch = "X86" Then
  136. $kbbb = MsgBox(4132, "Keyboard Backlight Flasher " & @CPUArch, "Soll das Keyboard Backlight auf " & @CPUArch & " Ebene geflasht werden?", 0)
  137. Switch $kbbb
  138. Case 6 ;YES
  139. ShellExecute(@WorkingDir & "WTP\finaltest\kbBacklightFlash.bat.lnk")
  140. Case 7 ;NO
  141. ;Your code here...
  142. EndSwitch
  143. ElseIf @OSArch = "X64" Then
  144. $kbbb = MsgBox(4132, "Keyboard Backlight Flasher " & @CPUArch, "Soll das Keyboard Backlight auf " & @CPUArch & " Ebene geflasht werden?", 0)
  145. Switch $kbbb
  146. Case 6 ;YES
  147. ShellExecute(@WorkingDir & "WTP\finaltest\kbBacklightFlash64.bat.lnk")
  148. Case 7 ;NO
  149. ;Your code here...
  150. EndSwitch
  151. Else
  152. $kbbb = MsgBox(4132, "Keyboard Backlight Flasher " & @CPUArch, "Soll das Keyboard Backlight auf " & @CPUArch & " Ebene geflasht werden?", 0)
  153. Switch $kbbb
  154. Case 6 ;YES
  155. ShellExecute(@WorkingDir & "WTP\finaltest\kbBacklightFlash64.bat.lnk")
  156. Case 7 ;NO
  157. ;Your code here...
  158. EndSwitch
  159. EndIf
  160. EndFunc ;==>_kbbacklightflash
  161.  
  162. Func _findkeydef()
  163. $keydefus = @WorkingDir & "WTP\asus-wtp\bin\keydef\keydef" & $getModelName & "us.ini"
  164. $keydefeu = @WorkingDir & "WTP\asus-wtp\bin\keydef\keydef" & $getModelName & "eu.ini"
  165. $ifileexistsus = FileExists($keydefus)
  166. $ifileexistseu = FileExists($keydefeu)
  167. If $ifileexistsus Then
  168. _WinAPI_ShellOpenFolderAndSelectItems($keydefus)
  169. ShellExecute($keydefus)
  170. ElseIf $ifileexistseu Then
  171. _WinAPI_ShellOpenFolderAndSelectItems($keydefeu)
  172. ShellExecute($keydefeu)
  173. Else
  174. MsgBox(16, "Nicht vorhanden", "Es wurde kein Keyboard-Layout gefunden! " & $getModelName, 0)
  175. EndIf
  176. EndFunc ;==>_findkeydef
  177.  
  178. Func _fixbios()
  179. $comparefix = MsgBox(36, "Bios-Fix", "Möchtest du den Bios-Compare-Fix durchführen?", 0)
  180. Switch $comparefix
  181. Case 6 ;YES
  182. $rc = FileCopy(@WorkingDir & "WTP\finaltest\NB_BIOS.txt", @WorkingDir & "WTP\asus-wtp\bin\conf\", 1)
  183. If $rc > 0 Then
  184. MsgBox(64, "Erfolgreich", "Bios-Compare-Fix wurde erfolgreich durchgeführt!", 0)
  185. Else
  186. MsgBox(16, "Fehler", "Bios-Compare-Fix konnte nicht durchgeführt werden!", 0)
  187. EndIf
  188. Case 7 ;NO
  189. ;Your code here...
  190. EndSwitch
  191. EndFunc ;==>_fixbios
  192.  
  193. Func _BiosCheat()
  194. $biosfile = @WorkingDir & "WTP\asus-wtp\bin\conf\NB_BIOS.txt"
  195. $ifileexist = FileExists($biosfile)
  196. If $ifileexist Then
  197. _WinAPI_ShellOpenFolderAndSelectItems($biosfile)
  198. ShellExecute($biosfile)
  199. Else
  200. $comparefix = MsgBox(20, "Nicht vorhanden", "Es wurde kein Bios-File gefunden? Soll der Compare-Fix ausgeführt werden?", 0)
  201. Switch $comparefix
  202. Case 6 ;YES
  203. _fixbios()
  204. Case 7 ;NO
  205. ;Your code here...
  206. EndSwitch
  207. EndIf
  208. EndFunc ;==>_BiosCheat
  209.  
  210. Func _2ndinjection()
  211. $serial = StringStripWS($getSerial, 8)
  212. MsgBox(64, "Seriennummer", "Die Seriennummer " & $serial & " wurde in die Zwischenablage kopiert!", 0)
  213. ClipPut($serial)
  214. EndFunc ;==>_2ndinjection
  215.  
  216. Func _tpInstall()
  217. $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)
  218. Switch $sinstall
  219. Case 1 ;OK
  220. ShellExecute(@WorkingDir & "WTP\finaltest\tp\uninstall.bat.lnk")
  221. Case 2 ;CANCEL
  222. ;Your code here...
  223. EndSwitch
  224. EndFunc ;==>_tpInstall
  225.  
  226. Func _dragsysprepwindow()
  227. Local $alang[5][2]
  228. $stext = "(Sysprep)"
  229. $ifound = _ArraySearch($alang, @OSLang)
  230. If $ifound <> -1 Then $stext = $alang[$ifound][1]
  231. WinWait("[CLASS:#32770]", $stext)
  232. $hwnd = WinGetHandle("[CLASS:#32770]", $stext)
  233. $apos = WinGetPos($hwnd)
  234. WinMove($hwnd, "", @DesktopWidth - $apos[2] - 15, @DesktopHeight - $apos[3] - (@DesktopHeight - 267 - 15))
  235. EndFunc ;==>_dragsysprepwindow
  236.  
  237. Func _dragwindowsactivewindow()
  238. WinWait("[CLASS:#32770; TITLE:WindowsActive]")
  239. $hwnd = WinGetHandle("[CLASS:#32770; TITLE:WindowsActive]")
  240. $apos = WinGetPos($hwnd)
  241. WinMove($hwnd, "", @DesktopWidth - $apos[2] - 15, @DesktopHeight - $apos[3] - (@DesktopHeight - 284 - 267 - 10 - 15))
  242. EndFunc ;==>_dragwindowsactivewindow
  243.  
  244. Func _dragfinaltesttoolswindow()
  245. WinWait("[TITLE:Final Test Tools v3]")
  246. $hwnd = WinGetHandle("[TITLE:Final Test Tools v3]")
  247. $apos = WinGetPos($hwnd)
  248. WinMove($hwnd, "", @DesktopWidth - $apos[2] - (@DesktopWidth - 430 - 12), @DesktopHeight - $apos[3] - (@DesktopHeight - 499 - 269 - 25))
  249. EndFunc ;==>_dragfinaltesttoolswindow
Advertisement
Add Comment
Please, Sign In to add comment