-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAllInOneProject.cpp
More file actions
108 lines (99 loc) · 3.04 KB
/
AllInOneProject.cpp
File metadata and controls
108 lines (99 loc) · 3.04 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
#include <iostream>
#include <Windows.h>
using namespace std;
void show_info()
{
SYSTEM_INFO si;
GetSystemInfo(&si);
cout << "================ system info ================" << endl;
cout << "architecture: ";
if (si.wProcessorArchitecture == 9) {
cout << "x64 (AMD64)" << endl;
}
else if (si.wProcessorArchitecture == 0) {
cout << "x86 (intel)" << endl;
}
else {
cout << "unknown" << endl;
}
cout << "number of processors: " << si.dwNumberOfProcessors << endl;
cout << "page size: " << si.dwPageSize << " bytes" << endl;
cout << "=============================================" << endl;
system("pause");
}
int main()
{
bool running = true;
while (running) {
system("title aio toolkit - made by brutalizedshrimpo");
int choice = -1;
cout << "1. internal wipeout\n";
cout << "2. external wipeout\n";
cout << "3. system checkup\n";
cout << "4. 'reset' network\n";
cout << "0. exit\n";
cout << "enter your choice: ";
cin >> choice;
if (choice == 1) {
system("color 0A");
cout << "deleting temporary files...\n";
system("del /f /s /q %temp%\\*.*");
cout << "deleted temporary files.\n";
cout << "deleting prefetch files...\n";
system("del /f /s /q %systemroot%\\prefetch\\*.*");
cout << "deleted prefetch files.\n";
system("pause");
}
else if (choice == 2) {
cout << "deleting old windows update files...\n";
system("Dism /Online /Cleanup-Image /StartComponentCleanup");
cout << "deleted old windows update files.\n";
cout << "cleaning browser cache...\n";
if (system("if exist \"%localappdata%\\Google\\Chrome\" (exit 0) else (exit 1)") == 0) {
cout << "found google chrome.\n";
system("cd /d \"%localappdata%\\Google\\Chrome\\User Data\\Default\" && del /f /s /q \"Cache\\*.*\" && del /f /s /q \"Code Cache\\*.*\" && del /f /s /q \"GPUCache\\*.*\"");
}
else {
cout << "no supported browsers found.\n";
}
if (system("if exist \"%localappdata%\\Microsoft\\Edge\" (exit 0) else (exit 1)") == 0) {
cout << "found microsoft edge.\n";
system("cd /d \"%localappdata%\\Microsoft\\Edge\\User Data\\Default\" && del /f /s /q \"Cache\\*.*\" && del /f /s /q \"Code Cache\\*.*\" && del /f /s /q \"GPUCache\\*.*\"");
}
else {
cout << "no supported browsers found.\n";
}
cout << "cleaned chrome/edge cache.\n";
system("pause");
}
else if (choice == 3) {
system("color 0B");
cout << "running system checkup...\n";
system("sfc /scannow");
cout << "system checkup complete.\n";
system("findstr /c:'[SR]' %windir%\\Logs\\CBS\\CBS.log > %userprofile%\\Desktop\\sfclogs.txt");
cout << "saved sfc logs to desktop.\n";
system("pause");
}
else if (choice == 4) {
system("color 0C");
cout << "resetting network...\n";
system("netsh winsock reset");
cout << "network reset complete.\n";
cout << "restart your computer.\n";
system("pause");
}
else if (choice == 9) {
system("cls");
show_info();
}
else if (choice == 0) {
cout << "exiting program...\n";
running = false;
}
else {
running = false;
}
system("cls");
}
}