Vista上的UAC有不同的动作吗? [英] UACs on Vista have different action?

查看:64
本文介绍了Vista上的UAC有不同的动作吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好:

我在Vista中遇到有关UAC的问题.

我创建了一个程序来访问注册表HKEY_LOCAL_MACHINE.
但是当我在两个PC上运行该程序时.我得到了不同的结果.

发​​生在PC虚拟化上,它被重定向到HKEY_CURRENT_USER的VirtualStore.

,但在另一台PC上,HKEY_LOCAL_MACHINE键值被修改.


我写了这样的代码:

if(!:: RegCreateKeyEx(HKEY_LOCAL_MACHINE,"SOFTWARE \\ Mykey",0,,"

if(:: RegSetValueEx(hkResult,"MyValue" ,,,,){

}

}

两个PC的UAC状态都为ON.登录用户具有管理员权限

我不知道为什么有些PC可以修改HKEY_LOCAL_MACHINE的值,而有些PC无法修改它.

i检查了有关UAC的本地安全策略,它们是相同的.

,如果其他一些地方可以设置一个选项,以允许具有管理员特权的用户设置HKEY_LOCAL_MACHINE键值.


任何帮助将不胜感激.

在此先感谢和感谢.

解决方案

1.在运行应用程序之前,有两台机器是否都向您提供UAC提示?

2.是否在两台计算机上都修改了密钥的权限?

3.您是否使用策略结果集和适当的注册表项检查了UAC的状态? (TweakUAC在这里派上用场了)


Hi, every one: 
   

  i am troubling in a problem about UAC on with Vista.

  i create a program to access registory HKEY_LOCAL_MACHINE.
   But when i run the Program at two Pcs. i got the different result .

 

On a Pc Virtualization happened,  it was Redirected  to VirtualStore of HKEY_CURRENT_USER.

but on another pc, the HKEY_LOCAL_MACHINE key value is modified.


  i wrote code like this:

 

  if (!::RegCreateKeyEx(HKEY_LOCAL_MACHINE, "SOFTWARE\\Mykey", 0, "",
      REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &hkResult, &dwDisposition)) {

     if(::RegSetValueEx(hkResult, "MyValue",,,,){

    }

}

 

Two Pcs's UAC status are ON both. the logon users have administrator privilege 

 

i dont know why some Pcs can modify HKEY_LOCAL_MACHINE value,some Ones can not do it.

i checked the local security policy about UAC,they are same.

 

if some other places can set  a option to permit a user with administrator privilege to set HKEY_LOCAL_MACHINE key values.


Any help would be greatly appreciated.

Regards and thanks in advance.

解决方案

1. Is either machine giving you a UAC prompt before running the application?

2. Have the permissions on the key been modified on either machine?

3. Have you checked the status of UAC using Resultant Set of Policy and the appropriate registry keys? (TweakUAC comes in handy here)

 


这篇关于Vista上的UAC有不同的动作吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆