-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstalacao.py
More file actions
184 lines (148 loc) · 6.65 KB
/
instalacao.py
File metadata and controls
184 lines (148 loc) · 6.65 KB
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
import os
import zipfile
import requests
from object_execute import Object_execute
class Caixainstall(Object_execute):
def define_param(self):
self.descricao = "Instalação do Caixa"
self.definicao = "caixainstall"
def thread_configurar(self):
self.java = Java()
self.java.window = self.window
self.java.values = self.values
self.java.reportar = self.reportar
self.java.thread_configurar()
self.reportar("Baixando o Caixa")
if not os.path.isfile(self.diretorioarcom + "\\Setup.jar"):
file_id = "1u0JnYuLxxcOgMTU5iYwMR20SOwBq3vaB"
destination = self.diretorioarcom + "\\Setup.jar"
self.download_file_from_google_drive(file_id, destination)
self.reportar("Download finalizado")
self.reportar("Executando instalação do Caixa")
self.executar("java -jar " + self.diretorioarcom + "\\Setup.jar")
self.executar(
"move " + self.userdesktop + "\\Caixa.lnk " + self.allusersdesktop
)
class Sisbrinstall(Object_execute):
def define_param(self):
self.descricao = "Instalação do Sisbr 2.0"
self.definicao = "sisbr20install"
def thread_configurar(self):
self.adobeair = Adobeair()
self.adobeair.window = self.window
self.adobeair.values = self.values
self.adobeair.reportar = self.reportar
self.adobeair.thread_configurar()
self.reportar("Baixando sisbr 2.0")
if not os.path.isfile(self.diretorioarcom + "\\sisbr2.0.exe"):
file_id = "13E-X5fZZrj2FMZDIcLWJ94c9DgTqUA3f"
destination = self.diretorioarcom + "\\sisbr2.0.exe"
self.download_file_from_google_drive(file_id, destination)
self.reportar("Download finalizado")
self.reportar("Executando instalação do Sisbr2.0")
self.executar(self.diretorioarcom + "\\sisbr2.0.exe")
self.executar(
"move " + self.userdesktop + '"\\Sisbr 2.0.lnk" ' + self.allusersdesktop
)
class Citrixinstall(Object_execute):
def define_param(self):
self.descricao = "Instalação do Citrix 10"
self.definicao = "citrix10"
def thread_configurar(self):
self.diretorioarcomcitrix = self.diretorioarcom + "\\Citrix"
self.criardiretorio(self.diretorioarcomcitrix)
self.reportar("Baixando citrix 10")
if not os.path.isfile(self.diretorioarcom + "\\Citrix10.zip"):
file_id = "19o1eGqGL6xR1B9b3VYunea4zzYe3Heb9"
destination = self.diretorioarcom + "\\Citrix10.zip"
self.download_file_from_google_drive(file_id, destination)
self.reportar("Download finalizado")
self.reportar("Executando descompactação")
with zipfile.ZipFile(self.diretorioarcom + "\\Citrix10.zip", "r") as citrixzip:
citrixzip.extractall(self.diretorioarcomcitrix)
self.reportar("Executando instalação do Citrix10")
self.executar(
'msiexec /i "'
+ self.diretorioarcomcitrix
+ '\\Citrix10\\Versao 10.1\\PN_10_1.msi"'
)
class Sicoobnetinstall(Object_execute):
def define_param(self):
self.descricao = "Instalação do SicoobNet"
self.definicao = "sicoobnet"
def thread_configurar(self):
if not os.path.isfile(
self.diretorioarcom + "\\instalador-sicoobnet-windows-amd64.exe"
):
self.reportar("Baixando Sicoobnet Empresarial")
urlsicoobnet = "https://office-sicoob-instalador.s3-us-west-2.amazonaws.com/instalador-sicoobnet-windows-amd64.exe"
download = requests.get(urlsicoobnet, allow_redirects=True)
open(
self.diretorioarcom + "\\instalador-sicoobnet-windows-amd64.exe", "wb"
).write(download.content)
self.reportar("Executando instalação do Sicoobnet")
self.executar(self.diretorioarcom + "\\instalador-sicoobnet-windows-amd64.exe")
class Spark(Object_execute):
def define_param(self):
self.descricao = "Instalação do Spark"
self.definicao = "spark"
def thread_configurar(self):
self.installprograma(self.diretorioarcom, self.definicao)
appdata = os.getenv("APPDATA")
if not os.path.exists(appdata + "\\Spark"):
os.mkdir(appdata + "\\Spark")
filesparkconf = appdata + "\\Spark\\spark.properties"
with open(filesparkconf, "w") as sparkconf:
sparkconf.write(self.filestringspark)
sparkconf.close()
class Adobeair(Object_execute):
def define_param(self):
self.descricao = "Instalação do Adobe Air"
self.definicao = "adobeair"
def thread_configurar(self):
self.reportar("Baixando Adobe Air")
if not os.path.isfile(self.diretorioarcom + "\\adobeair.exe"):
file_id = "13fUuPTnwpzIoydnefw9bcdX2h5KbJb0N"
destination = self.diretorioarcom + "\\adobeair.exe"
self.download_file_from_google_drive(file_id, destination)
self.reportar("Download finalizado")
self.reportar("Executando instalação do Adobeair")
self.executar(self.diretorioarcom + "\\adobeair")
class Java(Object_execute):
def define_param(self):
self.descricao = "Instalação do Java"
self.definicao = "javaruntime"
def thread_configurar(self):
self.installprograma(
self.diretorioarcom, 'jre8 -PackageParameters "/exclude:64" -y'
)
class Teamviewer(Object_execute):
def define_param(self):
self.descricao = "Instalação do Teamviewer"
self.definicao = "teamviewer"
def thread_configurar(self):
self.installprograma(self.diretorioarcom, self.definicao)
class Anydesk(Object_execute):
def define_param(self):
self.descricao = "Instalação do Anydesk"
self.definicao = "anydesk.install"
def thread_configurar(self):
self.installprograma(self.diretorioarcom, self.definicao)
class Googlechrome(Object_execute):
def define_param(self):
self.descricao = "Instalação do Google Chrome"
self.definicao = "googlechrome"
def thread_configurar(self):
self.installprograma(self.diretorioarcom, self.definicao)
class Firefox(Object_execute):
def define_param(self):
self.descricao = "Instalação do Firefox"
self.definicao = "firefox"
def thread_configurar(self):
self.installprograma(self.diretorioarcom, self.definicao)
class Adobereader(Object_execute):
def define_param(self):
self.descricao = "Instalação do Adobe Reader"
self.definicao = "adobereader"
def thread_configurar(self):
self.installprograma(self.diretorioarcom, self.definicao)