update game check

This commit is contained in:
IsWaffle 2023-12-19 14:58:12 -05:00
parent 7c247b15dc
commit cc9279825c
2 changed files with 6 additions and 6 deletions

View File

@ -16,17 +16,17 @@ public static class PreCheckHelper
return null;
var uninstallStringValue = Registry.LocalMachine.OpenSubKey(registryInstall, false)
?.GetValue("UninstallString");
var info = (uninstallStringValue is string key) ? new FileInfo(key) : null;
?.GetValue("InstallLocation");
var info = (uninstallStringValue is string key) ? new DirectoryInfo(key) : null;
return info?.DirectoryName;
return info?.FullName;
}
public static Result DetectOriginalGameVersion(string gamePath)
{
try
{
string version = FileVersionInfo.GetVersionInfo(Path.Join(gamePath + "/EscapeFromTarkov.exe")).ProductVersion.Replace('-', '.').Split('.')[^2];
string version = FileVersionInfo.GetVersionInfo(Path.Join(gamePath, "/EscapeFromTarkov.exe")).ProductVersion.Replace('-', '.').Split('.')[^2];
return Result.FromSuccess(version);
}
catch (Exception ex)

View File

@ -9,8 +9,8 @@
<PackageIcon>icon.ico</PackageIcon>
<ApplicationIcon>Assets\icon.ico</ApplicationIcon>
<Configurations>Debug;Release;TEST</Configurations>
<AssemblyVersion>2.24</AssemblyVersion>
<FileVersion>2.24</FileVersion>
<AssemblyVersion>2.25</AssemblyVersion>
<FileVersion>2.25</FileVersion>
<Company>SPT-AKI</Company>
</PropertyGroup>