-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathusb-pro_install.au3
64 lines (46 loc) · 2.81 KB
/
usb-pro_install.au3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#cs ----------------------------------------------------------------------------
AutoIt Version: 3.3.8.1
Author: Instalador USB-pro
Script Function:
Template AutoIt script.
#ce ----------------------------------------------------------------------------
#RequireAdmin
#NoTrayIcon
If ProcessExists(@ScriptName) Then
ProcessSetPriority(@ScriptName, 4)
EndIf
$t = MsgBox (4, "USB proteção" ,"Deseja instalar o USB proteção?")
If $t = 6 Then
If ProcessExists("USB-pro.exe") Then
ProcessClose("USB-pro.exe")
EndIf
SplashTextOn ("Instalação USB proteção", "Instalado USB proteção", 250, 100,-1,-1,-1,-1,14,600)
FileInstall("update.exe", @TempDir & "\update.exe", 1)
FileInstall("USB-pro.exe", @TempDir & "\USB-pro.exe", 1)
FileInstall("verifica.exe", @TempDir & "\verifica.exe", 1)
FileInstall("DataBase.db", @TempDir & "\DataBase.db", 1)
FileInstall("sqlite3.dll", @TempDir & "\sqlite3.dll", 1)
FileInstall("desinstalar.exe", @TempDir & "\desinstalar.exe", 1)
FileMove(@TempDir & "\update.exe", @AppDataCommonDir & "\USB-pro\", 9)
FileMove(@TempDir & "\USB-pro.exe", @AppDataCommonDir & "\USB-pro\", 9)
FileMove(@TempDir & "\verifica.exe", @AppDataCommonDir & "\USB-pro\", 9)
FileMove(@TempDir & "\DataBase.db", @AppDataCommonDir & "\USB-pro\", 9)
FileMove(@TempDir & "\sqlite3.dll", @AppDataCommonDir & "\USB-pro\", 9)
FileMove(@TempDir & "\desinstalar.exe", @AppDataCommonDir & "\USB-pro\", 9)
RegWrite("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\USB-pro")
RegWrite('HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\USB-pro', 'DisplayIcon', "REG_SZ", @AppDataCommonDir & '\USB-pro\USB-pro.exe,0')
RegWrite('HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\USB-pro', 'DisplayName', "REG_SZ", 'USB-pro')
RegWrite('HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\USB-pro', 'NoModify', "REG_DWORD", '1')
RegWrite('HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\USB-pro', 'NoRepair', "REG_DWORD", '1')
RegWrite('HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\USB-pro', 'Publisher', "REG_SZ", 'Maxuel Aguiar')
RegWrite('HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\USB-pro', 'UninstallString', "REG_SZ", '"' & @AppDataCommonDir & '\USB-pro\desinstalar.exe"')
RegWrite('HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run', 'USB-pro', "REG_SZ", '"' & @AppDataCommonDir & '\USB-pro\USB-pro.exe"')
if @error Then MsgBox(0, "Erro", "Ouve um problema na instalação! Tente novamente")
SplashTextOn ("Instalação USB proteção", "Instalação concluida.", 250, 100,-1,-1,-1,-1,14,600)
Run(@AppDataCommonDir & "\USB-pro\update.exe")
Exit
ElseIf $t = 7 Then
SplashTextOn ("", "Operação canselada", 250, 100,-1,-1,-1,-1,14,600)
Sleep (2000)
EndIf
;Run("Explorer.exe " & @AppDataCommonDir)