本文介绍了Registry.CurrentUser 为空的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用以下属性在我的代码中设置/读取注册表值.但是,在该行中:

I am using the following property to set/read registry values in my code. However, in the line:

RegistryKey regKey = Registry.CurrentUser;

regKey 为空.这种情况只发生在少数机器上.有什么想法吗?

regKey is null. This is happening only in a few machines. Any idea?

推荐答案

RegistryKey regRPP = Registry.CurrentUser.CreateSubKey(@"Software\Softech\FaceReader");

//这是它将创建的路径

//this is the path it will create

regRPP.SetValue("FaceReaderURL", "http://localhost/pnm/v4_spp/");

这篇关于Registry.CurrentUser 为空的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-28 19:08