-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
34 lines (30 loc) · 1019 Bytes
/
Program.cs
File metadata and controls
34 lines (30 loc) · 1019 Bytes
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
using System;
using System.IO;
using System.Diagnostics;
using System.Windows.Forms;
class Program
{
[STAThread]
static void Main()
{
string rbx = "Roblox";
string exe = "RobloxStudioBeta.exe";
string path = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), rbx, "Versions");
if (!Directory.Exists(path))
{
MessageBox.Show("An installation of Roblox does not exist for this user.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
foreach (string dir in Directory.GetDirectories(path, "version-*"))
{
string exePath = Path.Combine(dir, exe);
if (File.Exists(exePath))
{
Process.Start(exePath);
return;
}
}
MessageBox.Show("Did not find Roblox Studio in this user's Roblox installation.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
}