美文网首页
读取Windows注册列表中的路径信息

读取Windows注册列表中的路径信息

作者: RichMartin | 来源:发表于2019-08-28 09:52 被阅读0次
image.png
            string info = "";
            RegistryKey Key = Registry.Users;
            System.Security.Principal.WindowsIdentity currentUser = System.Security.Principal.WindowsIdentity.GetCurrent();
            string sid = currentUser.User.ToString();
            var subkey = sid + "\\Software\\NetDragon\\VRlife";
            var myreg = Key.OpenSubKey(sid+ "\\Software\\NetDragon\\VRlife");
            info = myreg.GetValue("VRPath").ToString();
            myreg.Close();

相关文章

网友评论

      本文标题:读取Windows注册列表中的路径信息

      本文链接:https://www.haomeiwen.com/subject/chtpectx.html