[Almost Solved] Unreal fails to read environment variable and fails to detect Visual Studio

@Jamie and Ben,

I was narrowing the issue and it seems the problem is with this line in VSAccessorModule.cpp:

FProcHandle WorkerHandle = FPlatformProcess::CreateProc(*ExecutablePath, *Params, true, false, false, nullptr, 0, nullptr, nullptr);

With the help of UE_LOG() i can see the Executable Path and Solution Path are all valid. I still dont understand why WorkerHandle is not valid

In-Editor (See the putput log):

Code: