如何在Windwos Vista中禁用UAC并赢得7 [英] How to disable UAC in Windwos Vista and win 7

查看:75
本文介绍了如何在Windwos Vista中禁用UAC并赢得7的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我正在使用VB.Net编写程序安装程序,我在禁用UAC以完成安装方面遇到困难。

以下是我用它来禁用UAC的代码:



Hi,

I am writing program installer using VB.Net and I am facing difficulty in disabling UAC to complete the installaion.
Here is the code that I am using it to disable the UAC:

Dim regKey As RegistryKey
        Dim ver As Decimal
        Dim keyst As String = "Software\Microsoft\Windows\CurrentVersion\Policies\System"
        regKey = Registry.LocalMachine.OpenSubKey(keyst, True)
        ver = regKey.GetValue("EnableLUA", 0.0)
        If ver = 1.0 Then
            regKey.SetValue("EnableLUA", 0)
            'My.Computer.Registry.SetValue("HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System", "EnableLUA", 0)
        End If
        MsgBox(regKey.GetValue("EnableLUA"))
        regKey.Close()





我试图将值写入注册表,但得到一个

UnauthorizedAccessException当我尝试在一个SetValue上现有钥匙。



任何帮助请:)



I am attempting to write values to the registry, but get an
UnauthorizedAccessException when I try to do a SetValue on an existing key.

Any help please :)

推荐答案

Gee - UAC如果它超级有用只保护人们不受peopel编写的程序的影响,他们不知道怎么关掉它。



UAC是一个笑话,但对我来说很明显你可以' t在代码中将其关闭。
Gee - UAC would be super useful if it only protected people from programs written by peopel who didn't know how to just turn it off.

UAC is a joke, but it's obvious to me that you can't turn it off in code.


您需要具有管理员权限,通常是如何工作的。
You need to have administrator rights, is typically how it works.


是Gras;

我无法在代码中禁用它...
Yes Gras;
I couldn't disable it in code...


这篇关于如何在Windwos Vista中禁用UAC并赢得7的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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