forked from EFLFE/PingoMeter
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUtils.cs
More file actions
24 lines (23 loc) · 659 Bytes
/
Utils.cs
File metadata and controls
24 lines (23 loc) · 659 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
using System;
using Microsoft.Win32;
namespace PingoMeter
{
public static class Utils
{
/// <summary>
/// Return true if app running on Windows 8 or next versions.
/// </summary>
public static bool IsWindows8Next()
{
try
{
string productName = (string)Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\Windows NT\CurrentVersion").GetValue("ProductName");
return productName.StartsWith("Windows 8") || productName.StartsWith("Windows 10");
}
catch
{
return false;
}
}
}
}