This repository has been archived by the owner on Apr 20, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSourceCode_Installer.cs
109 lines (95 loc) · 4.71 KB
/
SourceCode_Installer.cs
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
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;
namespace BareBonesRobloxInstaller
{
internal class Program
{
static void Main(string[] args)
{
//BareBonesRoblox Installer, Written by Axelan_se
//https://axell.me
bool foundinstall = false;
Console.WriteLine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + @"\Roblox\Versions");
foreach (string robloxversiondir in Directory.GetDirectories(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + @"\Roblox\Versions"))
{
if (Directory.Exists(robloxversiondir + @"\content"))
{
if (File.Exists(robloxversiondir + @"\RobloxPlayerLauncher.exe"))
{
foundinstall = true;
//finidng roblox install
Console.WriteLine("Found Roblox Installation at " + robloxversiondir);
Console.WriteLine("Installing Content ...");
//install bootstrapper
if (File.Exists(robloxversiondir + @"\RobloxPlayerLauncher.exe"))
{
File.Delete(robloxversiondir + @"\RobloxPlayerLauncher.exe");
Console.WriteLine("Removed Stock Bootstrapper");
}
try
{
using (var client = new WebClient())
{
client.DownloadFile("https://github.com/Axelanse/BareBonesRoblox/raw/main/RobloxPlayerLauncher.exe", robloxversiondir + @"\RobloxPlayerLauncher.exe");
Console.WriteLine("downloaded successfully");
}
}
catch (Exception ex)
{
Console.WriteLine("Failed to download Bootstrapper. Error: " + ex);
}
Console.Clear();
Console.WriteLine("BareBonesRoblox Has been successfully installed!");
Console.WriteLine("you can now close this window!");
Console.ReadKey();
}
}
}
if (foundinstall == false)
{
Console.Clear();
Console.WriteLine("No roblox installation found in appdata! searching programs 86");
foreach (string robloxversiondir in Directory.GetDirectories(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86) + @"\Roblox\Versions"))
{
if (Directory.Exists(robloxversiondir + @"\content"))
{
if (File.Exists(robloxversiondir + @"\RobloxPlayerLauncher.exe"))
{
foundinstall = true;
//finidng roblox install
Console.WriteLine("Found Roblox Installation at " + robloxversiondir);
Console.WriteLine("Installing Content ...");
//install bootstrapper
if (File.Exists(robloxversiondir + @"\RobloxPlayerLauncher.exe"))
{
File.Delete(robloxversiondir + @"\RobloxPlayerLauncher.exe");
Console.WriteLine("Removed Stock Bootstrapper");
}
try
{
using (var client = new WebClient())
{
client.DownloadFile("https://github.com/Axelanse/BareBonesRoblox/raw/main/RobloxPlayerLauncher.exe", robloxversiondir + @"\RobloxPlayerLauncher.exe");
Console.WriteLine("downloaded successfully");
}
}
catch (Exception ex)
{
Console.WriteLine("Failed to download Bootstrapper. Error: " + ex);
}
Console.Clear();
Console.WriteLine("BareBonesRoblox Has been successfully installed!");
Console.WriteLine("you can now close this window!");
Console.ReadKey();
}
}
}
}
}
}
}