diff --git a/SPTInstaller/Installer Tasks/PreChecks/Net8PreCheck.cs b/SPTInstaller/Installer Tasks/PreChecks/Net8PreCheck.cs index 74ff95c..ac0b590 100644 --- a/SPTInstaller/Installer Tasks/PreChecks/Net8PreCheck.cs +++ b/SPTInstaller/Installer Tasks/PreChecks/Net8PreCheck.cs @@ -33,7 +33,8 @@ public class Net8PreCheck : PreCheckBase 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) { diff --git a/SPTInstaller/Installer Tasks/PreChecks/NetCore6PreCheck.cs b/SPTInstaller/Installer Tasks/PreChecks/NetCore6PreCheck.cs index bb2e996..83fad6d 100644 --- a/SPTInstaller/Installer Tasks/PreChecks/NetCore6PreCheck.cs +++ b/SPTInstaller/Installer Tasks/PreChecks/NetCore6PreCheck.cs @@ -33,7 +33,8 @@ public class NetCore6PreCheck : PreCheckBase 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) {