Fix a very rare edge case of someone running Windows on a non-C: drive letter
This commit is contained in:
parent
973d8872b6
commit
262d185203
@ -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)
|
||||||
{
|
{
|
||||||
|
@ -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)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user