-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Tools.ps1
272 lines (268 loc) · 10.4 KB
/
Tools.ps1
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
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
######################################################################################################################################################################################
### All the Tools ###
######################################################################################################################################################################################
#Process Killer
function Test_Kill_Process{
$Kill_Process = Test-Path .\Scripts\ProcessKiller-Tuning-Pack.bat
if ($Kill_Process){
$ButtonToolsKillProcess.Add_Click{(Kill-Process)}
$ButtonToolsKillProcess.ForeColor = 'Green'
} else {
$ButtonToolsKillProcess.Add_Click{(Download_Kill-Process)}
$ButtonToolsKillProcess.ForeColor = 'RED'
}
}
function Kill-Process{
[System.Windows.Forms.MessageBox]::Show("Prozesse werden beendet","TGF Tuning Pack 4.1",1)
Write-Host "Prozesse werden beendet."
& '.\Scripts\ProcessKiller-Tuning-Pack.bat'
Write-Host "Die Prozesse wurden beendet"
Test_Kill_Process
}
function Download_Kill-Process{
Set-Location .\Scripts\
wget 'http://download.tuning-pack.de/TGF/Scripts/ProcessKiller-Tuning-Pack.bat' -OutFile 'ProcessKiller-Tuning-Pack.bat' -UseBasicParsing
Set-Location .\..\
Test_Kill_Process
}
#Internet Explorer Cleanup
function Test_IE_Clean{
$IE_Clean = Test-Path '.\Tools\IE Cleanup\Clear-IECachedData.ps1'
if ($IE_Clean){
$Button4.Add_Click{(IE_Clean)}
$Button4.ForeColor = 'Green'
} else {
$Button4.Add_Click{(Download_IE_Clean)}
$Button4.ForeColor = 'RED'
}
}
function IE_Clean{
& '.\Tools\IE Cleanup\Clear-IECachedData.ps1'
}
function Download_IE_Clean{
Set-Location .\Tools\
wget 'http://download.tuning-pack.de/TGF/Tools/IE%20Cleanup.zip' -OutFile 'IE_Cleanup.zip' -UseBasicParsing
Expand-Archive .\IE_Cleanup.zip -DestinationPath .\
Set-Location .\..\
Test_IE_Clean
}
#CCleaner
function Test_CCleaner{
$IE_Clean = Test-Path '.\Tools\CCleaner\CCleaner.exe'
if ($IE_Clean){
$ButtonToolsCCleaner.Add_Click{(CCleaner)}
$ButtonToolsCCleaner.ForeColor = 'Green'
} else {
$ButtonToolsCCleaner.Add_Click{(Download_CCleaner)}
$ButtonToolsCCleaner.ForeColor = 'RED'
}
}
function CCleaner{
.\Tools\CCleaner\CCleaner.exe
}
function Download_CCleaner{
Set-Location .\Tools\
wget 'http://download.tuning-pack.de/TGF/Tools/CCleaner.zip' -OutFile 'CCleaner.zip' -UseBasicParsing
Expand-Archive .\CCleaner.zip -DestinationPath .\
Set-Location .\..\
Test_CCleaner
}
#BleachBit
function Test_BleachBit{
$IE_Clean = Test-Path '.\Tools\BleachBit\bleachbit.exe'
if ($IE_Clean){
$ButtonToolsBleachBit.Add_Click{(BleachBit)}
$ButtonToolsBleachBit.ForeColor = 'Green'
} else {
$ButtonToolsBleachBit.Add_Click{(Download_BleachBit)}
$ButtonToolsBleachBit.ForeColor = 'RED'
}
}
function BleachBit{
.\Tools\BleachBit\bleachbit.exe
}
function Download_BleachBit{
Set-Location .\Tools\
wget 'http://download.tuning-pack.de/TGF/Tools/BleachBit.zip' -OutFile 'BleachBit.zip' -UseBasicParsing
Expand-Archive .\BleachBit.zip -DestinationPath .\
Set-Location .\..\
Test_BleachBit
}
#Temp File Cleanup
function Test_TFC{
$IE_Clean = Test-Path '.\Tools\Temp File Cleanup\Cleanup.ps1'
if ($IE_Clean){
$ButtonToolsTempFileCleanup.Add_Click{(TFC)}
$ButtonToolsTempFileCleanup.ForeColor = 'Green'
} else {
$ButtonToolsTempFileCleanup.Add_Click{(Download_TFC)}
$ButtonToolsTempFileCleanup.ForeColor = 'RED'
}
}
function TFC{
& '.\Tools\Temp File Cleanup\Cleanup.ps1'
}
function Download_TFC{
Set-Location .\Tools\
wget 'http://download.tuning-pack.de/TGF/Tools/Temp%20File%20Cleanup.zip' -OutFile 'TempFileCleanup.zip' -UseBasicParsing
Expand-Archive .\TempFileCleanup.zip -DestinationPath .\
rm TempFileCleanup.zip
Set-Location .\..\
Test_TFC
}
#USB Device Cleanup
function Test_USBDeviceCleanup{
$IE_Clean = Test-Path '.\Tools\Drive Cleanup\DriveCleanup.exe'
if ($IE_Clean){
$ButtonToolsUSBDeviceCleanup.Add_Click{(USBDeviceCleanup)}
$ButtonToolsUSBDeviceCleanup.ForeColor = 'Green'
} else {
$ButtonToolsUSBDeviceCleanup.Add_Click{(Download_USBDeviceCleanup)}
$ButtonToolsUSBDeviceCleanup.ForeColor = 'RED'
}
}
function USBDeviceCleanup{
& '.\Tools\Drive Cleanup\DriveCleanup.exe'
}
function Download_USBDeviceCleanup{
Set-Location .\Tools\
wget 'http://download.tuning-pack.de/TGF/Tools/Drive%20Cleanup.zip' -OutFile 'DriveCleanup.zip' -UseBasicParsing
Expand-Archive .\DriveCleanup.zip -DestinationPath .\
rm DriveCleanup.zip
Set-Location .\..\
Test_USBDeviceCleanup
}
#Cleanup Duplicate Downloads
###FIXME###
#$ButtonToolsCleanupDuplicateDownloads.Add_Click{([System.Windows.Forms.MessageBox]::Show("WIP","TGF Tuning Pack 4.1"1))}
#Clear Windows event logs
#$ButtonToolsClearWindowsEventLogs.ForeColor = 'GREEN'
$ButtonToolsClearWindowsEventLogs.Add_Click{(Clear-EventLog Application,Security,System)}
#Clear Windows Update Cache
function Test_Clear-UpdateCache{
$IE_Clean = Test-Path '.\Tools\Clear Update Cache\Erase_Cache.bat'
if ($IE_Clean){
$ButtonToolsClearWindowsUpdateCache.Add_Click{(Clear-UpdateCache)}
$ButtonToolsClearWindowsUpdateCache.ForeColor = 'Green'
} else {
$ButtonToolsClearWindowsUpdateCache.Add_Click{(Download_Clear-UpdateCache)}
$ButtonToolsClearWindowsUpdateCache.ForeColor = 'RED'
}
}
function Clear-UpdateCache{
& '.\Tools\Clear Update Cache\Erase_Cache.bat'
}
function Download_Clear-UpdateCache{
Set-Location .\Tools\
wget 'http://download.tuning-pack.de/TGF/Tools/Clear%20Update%20Cache.zip' -OutFile 'ClearUpdateCache.zip' -UseBasicParsing
Expand-Archive .\ClearUpdateCache.zip -DestinationPath .\
rm ClearUpdateCache.zip
Set-Location .\..\
Test_Clear-UpdateCache
}
#Clear CryptNet SSL Cache
$ButtonToolsClearCryptNetSSLCache.Add_Click{(Clear-SSL)}
function Clear-SSL{
certutil -URLcache * delete
}
#Malwarebytes
$ButtonToolsMalwarebytesAntiMalware.Add_Click{(Malwarebytes)}
function Malwarebytes{
.\Tools\Malwarebytes\mb3-setup-consumer-3.8.3.2965-1.0.613-1.0.11878.exe
}
#Kaspersky Virus Removal Tool
function KVRT{
.\Tools\KVRT\KVRT.exe
}
$ButtonToolsKasperskyVirusRemovalTool.Add_Click{(KVRT)}
#Sophos Virus Removal Tool
$ButtonToolsNetAdapterRepair.Add_Click{(Sophos)}
function Sophos{
& '.\tools\Sophos Virus Removal Tool\Sophos Virus Removal Tool.exe'
}
#MSI installer Cleanup
$ButtonToolsMSIInstallerCleanup.Add_Click{(Installer-Cleanup)}
function Installer-Cleanup{
[System.Windows.Forms.MessageBox]::Show("Diese funktion ist momentan nicht verfügbar, Microsoft hat dieses Feature eingestellt. Ich arbeite momentan an einer Alternative","TGF Tuning Pack 4.1 by MinersWin",1)
}
#System File Checker
$ButtonToolsSystemFileChecker.Add_Click{(System-File-Checker)}
function System-File-Checker{
[System.Windows.Forms.MessageBox]::Show("Es wird sich gleich ein Konsolenfenster öffnen, in welchem ein Windows Image heruntergeladen wird, mit welchem das System auf Fehler geprüft wird. Das Image wird nach Abschluss des Vorgangs wieder gelöscht. Zum Bestätigen OK drücken","TGF Tuning Pack 4.1 by MinersWin",1)
& '.\Tools\System File Checker\Check.bat'
}
#DISM image check and repair
$ButtonToolsDISMImageCheckandRepair.Add_Click{(System-File-Checker)}
#CheckDisk
$buttontoolschkdsk.Add_Click{(start cmd.exe 'chkdsk C: /f /r')}
#Network Repair
$ButtonToolsNetworkRepair.Add_Click{(Network-Repair)}
function Network-Repair{
ipconfig /flushdns
netsh interface ip delete arpcache
netsh winsock reset catalog
}
#Page File Reset
$ButtonToolsPageFileReset.Add_Click{(Page-File-Reset)}
function Page-File-Reset{
C: computersystem where name="%computername%" set AutomaticManagedPagefile=True
}
#Defraggler
$ButtonToolsDefraggler.Add_Click{(Defraggler-Start)}
function Defraggler-Start{
.\Tools\Defraggler\Defraggler64.exe
}
$ButtonToolsADSSpy.Add_Click{(ADSSPy)}
function ADSSPy{
.\Tools\ADSSpy\ADSSpy.exe
}
#Adwcleaner
$ButtonToolsAdwCleaner.Add_Click{(ADWCleaner)}
function ADWCleaner{
.\Tools\AdwCleaner\adwcleaner_7.4.1.exe
}
#aswMBR
$ButtonToolsaswMBR.Add_Click{(aswMBR)}
function aswMBR{
.\Tools\aswMBR\aswmbr.exe
}
#autorun
$buttontoolsautorun.Add_Click{(autorun)}
function autorun{
.\Tools\autorun\Autoruns64.exe
}
#PCHunter
$ButtonToolsPCHunter.Add_Click{(PCHunter)}
function PCHunter{
.\Tools\PCHunter\PCHunter64.exe
}
#Net Adapter Repair
$ButtonToolsNetAdapterRepair.Add_Click{(Net-Adapter-Repair)}
function Net-Adapter-Repair{
.\tools\NetAdapterRepair\NetAdapterRepair1.2.exe
}
#ParkControl
$ButtonToolsParkControl.Add_Click{(Park-Control)}
function Park-Control{
.\Tools\ParkControl\ParkControl.exe
}
#System Recovery
$ButtonToolsSystemRecovery.Add_Click{(System-Recovery)}
function System-Recovery{
rstrui.exe
}
#Reboot to Recovery
$ButtonToolsReboottoRecovery.Add_Click{(Reboot-Recovery)}
function Reboot-Recovery{
shutdown /r /o /f /t 00
}
function Refresh_Tools{
#Test_Kill_Process
#Test_IE_Clean
#Test_CCleaner
#Test_BleachBit
#Test_TFC
#Test_USBDeviceCleanup
#Test_Clear-UpdateCache
}
Refresh_Tools