mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Use OSVersion.Version.Build to reduce registry access
This commit is contained in:
parent
d1f4f88bc2
commit
b74ea0071d
1 changed files with 3 additions and 6 deletions
|
|
@ -177,12 +177,9 @@ namespace Flow.Launcher.Infrastructure.Exception
|
|||
{
|
||||
try
|
||||
{
|
||||
using (RegistryKey registryKey = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\Windows NT\CurrentVersion\"))
|
||||
{
|
||||
var buildRevision = GetWindowsRevisionFromRegistry();
|
||||
var currentBuild = registryKey.GetValue("CurrentBuild").ToString();
|
||||
return currentBuild + "." + buildRevision;
|
||||
}
|
||||
var buildRevision = GetWindowsRevisionFromRegistry();
|
||||
var currentBuild = Environment.OSVersion.Version.Build;
|
||||
return currentBuild.ToString() + "." + buildRevision;
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue