Fix regex for build 1084

This commit is contained in:
Natsumi
2021-04-24 14:47:19 +12:00
parent 3c7531afff
commit 133368a326

View File

@@ -139,8 +139,8 @@ namespace VRCX
{
using (var key = Registry.ClassesRoot.OpenSubKey(@"VRChat\shell\open\command"))
{
// "C:\Program Files (x86)\Steam\steamapps\common\VRChat\launch.bat" "C:\Program Files (x86)\Steam\steamapps\common\VRChat" "%1"
var match = Regex.Match(key.GetValue(string.Empty) as string, "^\"(.+?)\\\\launch.bat\"");
// "C:\Program Files (x86)\Steam\steamapps\common\VRChat\launch.exe" "%1" %*
var match = Regex.Match(key.GetValue(string.Empty) as string, "(?!\")(.+?\\\\VRChat.*)(!?\\\\launch.exe\")");
if (match.Success == true)
{
var path = match.Groups[1].Value;