21 lines
519 B
C#
21 lines
519 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using Microsoft.Win32;
|
|
|
|
namespace OssTJiaUploaderService
|
|
{
|
|
public static class EnvReader
|
|
{
|
|
public static string GetMachineVariable(string name)
|
|
{
|
|
using (var key = Registry.LocalMachine.OpenSubKey(@"SYSTEM\CurrentControlSet\Control\Session Manager\Environment"))
|
|
{
|
|
return key?.GetValue(name)?.ToString();
|
|
}
|
|
}
|
|
}
|
|
}
|