本文介绍了在HKEY_LOCAL_MACHINE下设置注册表值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 大家好,            我需要在win 7,64bit中更改注册表中的值,路径为"HKLM / Software / Microsoft / Windows NT / CurrentVersion / ICM / Calibration"。我必须设置"CalibrationManagementEnabled"的值。到 1.我目前正在使用SetRegValueEx来设置值。我得到的返回值为5.(ERROR_ACCESS_DENIED)。如果我以管理员身份运行我的应用程序,则不会发生错误,但是注册表的预期路径没有变化。而是创建虚拟路径("HKLM / Software / Wow6432Node / Microsoft / Windows NT / CurrentVersion / ICM / Calibration"),其中设置了密钥,这对我的应用程序没有帮助。任何想法如何防止这种虚拟化,以便在预期的注册表位置更改值。我目前正在使用'visual studio 2005'。 Thnx 解决方案 Karan P Shah写道: 我需要在win 7,64bit中修改注册表中的值,路径 是"HKLM / Software / Microsoft / Windows NT / CurrentVersion / ICM / Calibration"。我必须设置 的值" CalibrationManagementEnabled"到1.我目前正在使用 SetRegValueEx来设置值。我的返回值为5.  (ERROR_ACCESS_DENIED)。 只有管理员可以在HKLM下书写。 如果我以管理员身份运行我的应用程序,没有发生错误,但是注册表的预期路径没有变化。 而是创建虚拟路径 http://msdn.microsoft.com/en-us/library/windows/desktop/aa384129.aspx Hi All,            I need to change a value in the registry in win 7, 64bit , The path being "HKLM/Software/Microsoft/Windows NT/CurrentVersion/ICM/Calibration". I have to set the value of "CalibrationManagementEnabled" to 1. I am currently using SetRegValueEx to set the value. I am getting a return value of 5. (ERROR_ACCESS_DENIED). If I run my application as admin, no error occurs, bt there is no change in the registry's intended path. Instead, a virtual path is created ("HKLM/Software/Wow6432Node/Microsoft/Windows NT/CurrentVersion/ICM/Calibration") with the key being set there which would not help my application. Any Ideas as how to prevent this virtulization, so that the value gets changed in the intended registry location. I am currently using 'visual studio 2005'.Thnx 解决方案 Karan P Shah wrote:I need to change a value in the registry in win 7, 64bit , The path  being "HKLM/Software/Microsoft/WindowsNT/CurrentVersion/ICM/Calibration". I have to set the value of  "CalibrationManagementEnabled" to 1. I am currently usingSetRegValueEx to set the value. I am getting a return value of 5.  (ERROR_ACCESS_DENIED).Only administrators can write under HKLM.If I run my application as admin, noerror occurs, bt there is no change in the registry's intended path.  Instead, a virtual path is createdhttp://msdn.microsoft.com/en-us/library/windows/desktop/aa384129.aspx 这篇关于在HKEY_LOCAL_MACHINE下设置注册表值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
10-24 17:47