請選擇 進入手機版 | 繼續訪問電腦版

微剋多資訊

 找回密碼
 註冊

Sign in with google

Google帳號登入

搜索
回覆 0則 瀏覽 13585篇
Line

[碼源] DU Meter 6.01 一鍵安裝 Code

該用戶從未簽到

升級   0%

發表於 2012-11-5 23:12 | 顯示全部樓層 |閱讀模式
本帖最後由 rictirse 於 2014-12-24 08:34 編輯

  1. #cs ----------------------------------------------------------------------------

  2. AutoIt Version: 3.3.8.1
  3. Author:        Dang Wang

  4. Script Function: DisplayFusion 4.2
  5.         Template AutoIt script.

  6. #ce ----------------------------------------------------------------------------
  7. #Region
  8. #AutoIt3Wrapper_icon=C:NewDang.ico
  9. #AutoIt3Wrapper_Compression=5
  10. #AutoIt3Wrapper_Res_Comment=DisplayFusion 4.2
  11. #AutoIt3Wrapper_Res_Description=DisplayFusion 4.2
  12. #AutoIt3Wrapper_Res_Fileversion=4.2.0.0
  13. #AutoIt3Wrapper_Res_LegalCopyright=噹噹
  14. #EndRegion
  15. #NoTrayIcon
  16. #RequireAdmin
  17. AutoItSetOption ( "WinTitleMatchMode", 4)

  18. _OneOpen()

  19. Dim Const $FileName=  "DUMeter-Install.exe"
  20. Dim Const $FormName = "Setup - DU Meter"
  21. ;------- (基於版權不公開 序號)-------
  22. Dim Const $IID = '';; 認證碼
  23. Dim Const $UserName = '';;; 授權者
  24. Dim Const $SerialNum = '' ;; 序號


  25. ;------- (1 Click;2 Check;3 UnCheck;4 SetText )-------
  26. Dim $Text[7][5] = [ [ "Select Setup Language", "Select the language to use during the installation:", "TNewButton1", 1, ""], _
  27.                                                         [ $FormName, "Welcome to the DU Meter", "TNewButton1", 1, ""], _

  28.                                                         [ $FormName, "Please read the following important information before continuing.", "TNewRadioButton1", 2, ""], _
  29.                                                         [ $FormName, "Please read the following important information before continuing.", "TNewButton2", 1, ""], _
  30.                                                         [ $FormName, "Where should DU Meter be installed?", "TNewButton3", 1, ""], _
  31.                                                         [ $FormName, "Click Finish to exit Setup.", "TNewCheckListBox1", 3, ""], _
  32.                                                         [ $FormName, "Click Finish to exit Setup.", "TNewButton3", 1, ""] ]

  33. $begin = TimerInit()
  34. FileInstall  ( "DUMeter-Install.exe", @TempDir&""&$FileName)


  35. FileInstall  ( "DUMeter.exe", @TempDir&"DUMeter.exe")
  36. FileInstall  ( "DUMeterSvc.exe", @TempDir&"DUMeterSvc.exe")

  37. ShellExecute (@TempDir&""&$FileName)

  38. While 1
  39.         For $i = 0 To UBound ( $Text, 1)-1
  40.                 Select
  41.                         Case WinExists ( $Text[$i][0], $Text[$i][1])
  42.                                 If $Text[$i][3] = 1 Then
  43.                                         ControlClick ( $Text[$i][0], $Text[$i][1], $Text[$i][2])
  44.                                 ElseIf $Text[$i][3] = 2 Then
  45.                                         ControlCommand ( $Text[$i][0], $Text[$i][1], $Text[$i][2], "Check", "")
  46.                                 ElseIf $Text[$i][3] = 3 Then
  47.                                         ControlCommand ( $Text[$i][0], $Text[$i][1], $Text[$i][2], "UnCheck", "")
  48.                                 ElseIf $Text[$i][3] = 4 Then

  49.                                         ControlSetText ( $Text[$i][0], $Text[$i][1], $Text[$i][2], $Text[$i][4])
  50.                                 EndIf
  51.                                 If $i = (UBound ( $Text, 1)-1) Then ExitLoop(2)
  52.                 EndSelect
  53.         Next
  54. WEnd

  55. ProcessWait ("DUMeter.exe")
  56. Do
  57.         ProcessClose ("DUMeter.exe")
  58.         ProcessClose ("DUMeterSvc.exe")
  59. Until Not ProcessExists ("DUMeter.exe") And Not ProcessExists ("DUMeterSvc.exe")

  60. FileMove ( @TempDir&"DUMeter.exe", @ProgramFilesDir&"DU MeterDUMeter.exe", 9)
  61. FileMove ( @TempDir&"DUMeterSvc.exe", @ProgramFilesDir&"DU MeterDUMeterSvc.exe", 9)

  62. _Crack()
  63. $dif = TimerDiff  ($begin)
  64. ShellExecute (@ProgramFilesDir&"DU MeterDUMeter.exe")

  65. MsgBox ( 0, "安裝完成", StringFormat ( "總安裝時間:%s秒", $dif/1000))

  66. Func _Crack()
  67.         RegWrite('HKEY_LOCAL_MACHINESOFTWAREHagelDU MeterRegistration', 'IID', 'REG_SZ', $IID)
  68.         RegWrite('HKEY_LOCAL_MACHINESOFTWAREHagelDU MeterRegistration', 'UserName', 'REG_SZ', $UserName)
  69.         RegWrite('HKEY_LOCAL_MACHINESOFTWAREHagelDU MeterRegistration', 'SerialNum', 'REG_SZ', $SerialNum)

  70. EndFunc

  71. Func _OneOpen()
  72.         Local $ProcessName = _FileNameConver (@AutoItExe)
  73.         Local $list = ProcessList()
  74.         Local $Cnt = 0
  75.         For $i = 1 To $list[0][0]
  76.                 If $list[$i][0] = $ProcessName Then
  77.                         $Cnt += 1
  78.                         If $Cnt > 1 Then
  79.                                 Exit
  80.                         EndIf
  81.                 EndIf
  82.         Next
  83. EndFunc

  84. Func _FileNameConver ($FileName, $Flag = 0)
  85.         $strtmp = StringSplit ($FileName, "");; 返回檔名
  86.         If $Flag <> 1 Then
  87.                 $strtmp = StringSplit ( $strtmp[$strtmp[0]], ".");; 返回副檔名
  88.         EndIf
  89.         Return $strtmp[$strtmp[0]]
  90. EndFunc
複製代碼
樓主熱門主題
您需要登入後才可以回帖 登入 | 註冊

本版積分規則

小黑屋|Archiver|微剋多資訊(MicroDuo)

GMT+8, 2024-3-29 20:23

Discuz! X

© 2009-2023 Microduo

快速回覆 返回頂部 返回列表