blob: b7e7c3ca0feb0bff3b6642783ee219916dc3b349 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
using System;
using Microsoft.Win32;
namespace FakeCMD
{
class Program
{
static void Main(string[] args)
{
#if DEBUG
Console.WriteLine("You are running .NET {0}", Environment.Version.ToString());
#endif
RegistryKey registryKey = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\Windows NT\CurrentVersion");
var buildNumber = registryKey.GetValue("UBR").ToString();
Console.WriteLine($"Microsoft Windows [Version {buildNumber}]");
Console.ReadLine();
}
}
}
|