using Microsoft.Win32; namespace CapaDeNegocio { public class GetSoftwareData { private static GetSoftwareData instance = null; private GetSoftwareData() { } public static GetSoftwareData GetInstance() { if (instance == null) { instance = new GetSoftwareData(); } return instance; } public string GetRegistryKeys(string SubKey, string NameKey) { string _GetRegistryKeys = ""; try { RegistryKey SOFTWARE = Registry.CurrentUser.OpenSubKey($"SOFTWARE\\DIIISS\\GMT\\SisAdmin\\{SubKey}\\"); _GetRegistryKeys = SOFTWARE.GetValue(NameKey).ToString(); SOFTWARE.Close(); } catch { } finally { } return _GetRegistryKeys; } } }