Skip to content
This repository was archived by the owner on Jun 27, 2025. It is now read-only.

Commit 64a9be0

Browse files
committed
Quick fix
1 parent f68c445 commit 64a9be0

File tree

4 files changed

+28
-30
lines changed

4 files changed

+28
-30
lines changed

VRC-Deep-Clean.sln

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
1010
.editorconfig = .editorconfig
1111
EndProjectSection
1212
EndProject
13-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VRCDC_GUI", "VRCDC_GUI\VRCDC_GUI.csproj", "{0BAF4CE0-EEB5-4F3D-9D5A-0CD5A92A85EA}"
14-
EndProject
1513
Global
1614
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1715
Debug|Any CPU = Debug|Any CPU
@@ -22,10 +20,6 @@ Global
2220
{2F39FAE1-454E-4544-81DE-4A6B9655FF61}.Debug|Any CPU.Build.0 = Debug|Any CPU
2321
{2F39FAE1-454E-4544-81DE-4A6B9655FF61}.Release|Any CPU.ActiveCfg = Release|Any CPU
2422
{2F39FAE1-454E-4544-81DE-4A6B9655FF61}.Release|Any CPU.Build.0 = Release|Any CPU
25-
{0BAF4CE0-EEB5-4F3D-9D5A-0CD5A92A85EA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
26-
{0BAF4CE0-EEB5-4F3D-9D5A-0CD5A92A85EA}.Debug|Any CPU.Build.0 = Debug|Any CPU
27-
{0BAF4CE0-EEB5-4F3D-9D5A-0CD5A92A85EA}.Release|Any CPU.ActiveCfg = Release|Any CPU
28-
{0BAF4CE0-EEB5-4F3D-9D5A-0CD5A92A85EA}.Release|Any CPU.Build.0 = Release|Any CPU
2923
EndGlobalSection
3024
GlobalSection(SolutionProperties) = preSolution
3125
HideSolutionNode = FALSE

VRC-Deep-Clean/Program.cs

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using System.Text;
1+
using System.Diagnostics;
2+
using System.Text;
23
using VRC_Deep_Clean.Utils;
34

45
namespace VRC_Deep_Clean
@@ -9,6 +10,9 @@ private static void Main(string[] args)
910
{
1011
Console.Title = string.Empty;
1112
Console.OutputEncoding = Encoding.UTF8;
13+
#pragma warning disable CS8622
14+
AppDomain.CurrentDomain.ProcessExit += OnProcessExit;
15+
#pragma warning restore CS8622
1216

1317
Console.SetWindowSize(120, 35);
1418

@@ -28,6 +32,11 @@ private static void Main(string[] args)
2832
CustomLog.Msg("↓↓↓\n\n[1] Delete and Clean up ALL of VRChat | [2] Delete, Uninstall, Clean ALL of VRChat and Reinstall | " +
2933
"[3] Simple Reinstall");
3034

35+
/*
36+
* CustomLog.Msg("↓↓↓\n\n[1] Delete and Clean up ALL of VRChat | [2] Delete, Uninstall, Clean ALL of VRChat and Reinstall | " +
37+
"[3] Simple Reinstall | [4] Use GUI");
38+
*/
39+
3140
try
3241
{
3342
#pragma warning disable CS8604
@@ -87,8 +96,17 @@ private static void Main(string[] args)
8796
case 3:
8897
Console.Clear();
8998
CustomLog.Logo();
99+
CustomLog.SetWorkingTitle("Reinstalling VRChat...");
90100
VRC.Reinstall();
101+
CustomLog.Log("Finished all steps!");
102+
Thread.Sleep(3500);
103+
Quit();
91104
break;
105+
case 4:
106+
//Will do in a later update
107+
Console.Clear();
108+
Thread.Sleep(1);
109+
goto MainMenu;
92110
default:
93111
Console.Clear();
94112
CustomLog.Logo();
@@ -113,6 +131,9 @@ private static void Main(string[] args)
113131
Quit();
114132
}
115133

134+
//Better quit than just clicking X
135+
private static void OnProcessExit(object sender, EventArgs e) { Quit(); }
136+
116137
private static void Quit()
117138
{
118139
CustomLog.SaveLogs();
@@ -121,7 +142,7 @@ private static void Quit()
121142
CustomLog.Warn("Goodbye! :D");
122143
CustomLog.Warn("Closing app in 3s");
123144
Thread.Sleep(3000);
124-
Environment.Exit(0);
145+
try { Process.GetCurrentProcess().Kill(); } catch { Environment.Exit(0); }
125146
}
126147
}
127-
}
148+
}

VRC-Deep-Clean/Utils/CustomLog.cs

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,7 @@ internal class CustomLog
99
//187, 28, 255 - main color
1010
public static void SaveLogs()
1111
{
12-
var dir = Directory.GetCurrentDirectory();
13-
try
14-
{
15-
using StreamWriter writer = new(dir + "\\Saved_Logs.txt");
16-
string line;
17-
#pragma warning disable CS8600
18-
while ((line = Console.ReadLine()) != null)
19-
{
20-
writer.WriteLine(line);
21-
}
22-
#pragma warning restore CS8600
23-
}
24-
catch
25-
{
26-
27-
}
12+
//Need to fix this later
2813
}
2914

3015
public static string ConsoleTitle { get; set; } = "VRC Deep Clean";

VRC-Deep-Clean/Utils/VRC.cs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -299,22 +299,20 @@ private static void FlushDNS()
299299

300300
public static void Reinstall()
301301
{
302-
CustomLog.Warn("Uninstalling VRC...");
302+
CustomLog.Warn("Reinstalling VRC...");
303303

304304
try
305305
{
306306
Process.Start(Batch.UninstallVRC);
307-
CustomLog.Log("Done!");
308307
}
309308
catch { }
309+
310310
CustomLog.Log("Please wait...");
311-
Thread.Sleep(10000);
311+
Thread.Sleep(20000);
312312

313-
CustomLog.Warn("Installing VRC...");
314313
try
315314
{
316315
Process.Start(Batch.InstallVRC);
317-
CustomLog.Log("Done!");
318316
}
319317
catch { }
320318
}

0 commit comments

Comments
 (0)