Как получить путь к файлу из реестра windows?
У меня есть файл, который установлен на моем механизме. Я пытаюсь получить путь из реестра файла и хочу выполнить файл exe-файла, если этот путь существует в реестре windows.
Кто-нибудь может мне помочь ?
Что я уже пробовал:
using (var hklm = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Registry64)) using (var key = hklm.OpenSubKey(@"SOFTWARE\PenMount")) { if (key != null) { this.Logger.Error("PenMount exists"); // Here i need to get the path for the Penmont software. // If the path exists then i have to execute the penmount.exe file } else { this.Logger.Error("not exists"); } }