0
0
mirror of https://github.com/sp-tarkov/modules.git synced 2025-02-13 06:10:45 -05:00

update game check (!44)

Co-authored-by: waffle.lord <waffle.lord@hotmail.com>
Reviewed-on: SPT-AKI/Modules#44
Co-authored-by: IsWaffle <waffle.lord@noreply.dev.sp-tarkov.com>
Co-committed-by: IsWaffle <waffle.lord@noreply.dev.sp-tarkov.com>
This commit is contained in:
IsWaffle 2023-12-19 20:23:07 +00:00 committed by Dev
parent 3c23adebe2
commit 54a6c706f0

View File

@ -14,20 +14,20 @@ namespace Aki.Core.Utils
try try
{ {
var v1 = Registry.LocalMachine.OpenSubKey(c0, false).GetValue("UninstallString"); var v1 = Registry.LocalMachine.OpenSubKey(c0, false).GetValue("InstallLocation");
var v2 = (v1 != null) ? v1.ToString() : string.Empty; var v2 = (v1 != null) ? v1.ToString() : string.Empty;
var v3 = new FileInfo(v2); var v3 = new DirectoryInfo(v2);
ServerLog.Debug("Aki.Core", v2); ServerLog.Debug("Aki.Core", v2);
ServerLog.Debug("Aki.Core", string.IsNullOrEmpty(v2) ? "0" : v3.Length.ToString()); ServerLog.Debug("Aki.Core", string.IsNullOrEmpty(v2) ? "0" : v3.Length.ToString());
var v4 = new FileInfo[] var v4 = new FileSystemInfo[]
{ {
v3, v3,
new FileInfo(v2.Replace(v3.Name, @"BattlEye\BEClient_x64.dll")), new FileInfo(Path.Join(v2, @"BattlEye\BEClient_x64.dll")),
new FileInfo(v2.Replace(v3.Name, @"BattlEye\BEService_x64.dll")), new FileInfo(Path.Join(v2, @"BattlEye\BEService_x64.dll")),
new FileInfo(v2.Replace(v3.Name, @"ConsistencyInfo")), new FileInfo(Path.Join(v2, "ConsistencyInfo")),
new FileInfo(v2.Replace(v3.Name, @"Uninstall.exe")), new FileInfo(Path.Join(v2, "Uninstall.exe")),
new FileInfo(v2.Replace(v3.Name, @"UnityCrashHandler64.exe")) new FileInfo(Path.Join(v2, "UnityCrashHandler64.exe"))
}; };
v0 = v4.Length - 1; v0 = v4.Length - 1;