in powershell-agent/src/main/java/jetbrains/buildServer/powershell/agent/detect/registry/RegistryPowerShellDetector.java [112:121]
private PowerShellInfo fetchInfoForDesktopEdition(@NotNull PowerShellBitness bitness, @NotNull String oneOrThree) {
String path = "SOFTWARE\\Microsoft\\PowerShell\\" + oneOrThree + "\\PowerShellEngine";
String version = myAccessor.readRegistryText(LOCAL_MACHINE, bitness.toBitness(), path, "PowerShellVersion");
File home = asDirectoryOrNull(myAccessor.readRegistryText(LOCAL_MACHINE, bitness.toBitness(), path, "ApplicationBase"));
if (version == null || home == null) {
LOG.debug("Skip PowerShell: " + bitness + " " + version + " " + home);
return null;
}
return new PowerShellInfo(bitness, home, version, PowerShellEdition.DESKTOP, "powershell.exe");
}