Merge pull request 'Fix a very rare edge case of someone running Windows on a non-C: drive letter' (#71) from DrakiaXYZ/SPT-AKI-Installer:feat-non-standard-windows into master

Reviewed-on: CWX/SPT-AKI-Installer#71

LGTM!!
This commit is contained in:
IsWaffle 2024-04-05 11:14:21 +00:00
commit 68b895786b
2 changed files with 4 additions and 2 deletions

View File

@ -33,7 +33,8 @@ public class Net8PreCheck : PreCheckBase
try try
{ {
var result = ProcessHelper.RunAndReadProcessOutputs(@"C:\Program Files\dotnet\dotnet.exe", "--list-runtimes"); var programFiles = Environment.ExpandEnvironmentVariables("%ProgramW6432%");
var result = ProcessHelper.RunAndReadProcessOutputs($@"{programFiles}\dotnet\dotnet.exe", "--list-runtimes");
if (!result.Succeeded) if (!result.Succeeded)
{ {

View File

@ -33,7 +33,8 @@ public class NetCore6PreCheck : PreCheckBase
try try
{ {
var result = ProcessHelper.RunAndReadProcessOutputs(@"C:\Program Files\dotnet\dotnet.exe", "--list-runtimes"); var programFiles = Environment.ExpandEnvironmentVariables("%ProgramW6432%");
var result = ProcessHelper.RunAndReadProcessOutputs($@"{programFiles}\dotnet\dotnet.exe", "--list-runtimes");
if (!result.Succeeded) if (!result.Succeeded)
{ {