草庐IT

SystemRestore

全部标签

C# 从注册表中获取 SystemRestore 的状态

我正在尝试从C#中的子项“HKLM\SOFTWARE\Microsoft\WindowsNT\CurrentVersion\SystemRestore”读取注册表项“RPSessionInterval”。我正在使用以下代码并收到异常“对象引用未设置到对象的实例。”stringsystemRestore=@"SOFTWARE\Microsoft\WindowsNT\CurrentVersion\SystemRestore";RegistryKeybaseRegistryKey=Registry.LocalMachine;publicstringSystemRestoreStatus(st