Fix parsing of Win10 product names from registry
This commit is contained in:
parent
e38726db50
commit
9220cf675e
|
@ -24,7 +24,7 @@ namespace BizHawk.Common
|
||||||
{
|
{
|
||||||
using var proc = ConstructSubshell("REG", $@"QUERY ""HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion"" /V {key}");
|
using var proc = ConstructSubshell("REG", $@"QUERY ""HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion"" /V {key}");
|
||||||
proc.Start();
|
proc.Start();
|
||||||
return proc.StandardOutput.ReadToEnd().Split(new[] { "\r\n", "\n" }, StringSplitOptions.RemoveEmptyEntries)[1].Split(new[] { '\t', ' ' }, StringSplitOptions.RemoveEmptyEntries)[2];
|
return proc.StandardOutput.ReadToEnd().Split(new[] { "\r\n", "\n" }, StringSplitOptions.RemoveEmptyEntries)[1].Split(new[] { "\t", " " }, StringSplitOptions.RemoveEmptyEntries)[2];
|
||||||
}
|
}
|
||||||
if (CurrentOS != DistinctOS.Windows) return null;
|
if (CurrentOS != DistinctOS.Windows) return null;
|
||||||
var rawWinVer = float.Parse(GetRegValue("CurrentVersion"), NumberFormatInfo.InvariantInfo); // contains '.' even when system-wide decimal separator is ','
|
var rawWinVer = float.Parse(GetRegValue("CurrentVersion"), NumberFormatInfo.InvariantInfo); // contains '.' even when system-wide decimal separator is ','
|
||||||
|
|
Loading…
Reference in New Issue