本文介绍了从Vista上的注册表中读取的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 我正在使用这种方法从注册表中读取。 Dim f作为新的RegistryPermission(RegistryPermissionAccess.AllAcc ess,_ " HKEY_LOCAL_MACHINE \ SOFTWARE \\ \\ SRS Enterprises\Coordinator\Settings") ''Vlad 02/12/2007 Dim f2 As New RegistryPermission(RegistryPermissionAccess.AllAcc ess,_ " HKEY_CURRENT_USER \Software \Classes \ VirtualStore \M ACHINE \ SOFTWARE \ SRS Enterprises\Coordinator\Settings") Dim pRegKey As RegistryKey = Registry.LocalMachine pRegKey.OpenSubKey(" SOFTWARE \\ SRS Enterprises\\Coordinator \\Settings") Dim val As Object = pRegKey.GetValue(" CSSLQN") > 适用于Windows XP上的Windows XP。它不适用于Vista Business。 pRegKey.GetValue(" CSSLQN")返回null。值为 的密钥存在。 我应该在代码中添加什么来从注册表中获取值? 谢谢你是这样的。 Vovan 解决方案 I''m using this approach to read from registry.Dim f As New RegistryPermission(RegistryPermissionAccess.AllAcc ess, _"HKEY_LOCAL_MACHINE\SOFTWARE\SRSEnterprises\Coordinator\Settings")''Vlad 02/12/2007Dim f2 As NewRegistryPermission(RegistryPermissionAccess.AllAcc ess, _"HKEY_CURRENT_USER\Software\Classes\VirtualStore\M ACHINE\SOFTWARE\SRSEnterprises\Coordinator\Settings") Dim pRegKey As RegistryKey = Registry.LocalMachinepRegKey.OpenSubKey("SOFTWARE\\SRSEnterprises\\Coordinator\\Settings")Dim val As Object = pRegKey.GetValue("CSSLQN") It works on Windows XP, on Windows Server 2003. It doesn''t work on VistaBusiness. pRegKey.GetValue("CSSLQN") returns null. The key with valueexists. What should I add to my code to get the value from a registry?Thank you Vovan 解决方案 这篇关于从Vista上的注册表中读取的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
10-20 08:31