-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRegistryKeys.cs
31 lines (30 loc) · 981 Bytes
/
RegistryKeys.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
using Microsoft.Win32;
using System.Runtime.Versioning;
using System.Text;
namespace OrnaLibs
{
[SupportedOSPlatform("windows")]
public static class RegistryKeys
{
public static RegistryKey LocalMachineUninstallX86
{
get
{
var path = new StringBuilder();
path.Append(@"SOFTWARE\");
if (Environment.Is64BitOperatingSystem) path.Append("WOW6432Node\\");
path.Append(@"Microsoft\Windows\CurrentVersion\Uninstall\");
return Registry.LocalMachine.OpenSubKey(path.ToString(), true)!;
}
}
public static RegistryKey LocalMachineUninstall
{
get
{
var path = new StringBuilder();
path.Append(@"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\");
return Registry.LocalMachine.OpenSubKey(path.ToString(), true)!;
}
}
}
}