开发者

Is there a way to turn ON UAC programmatically with C#?

开发者 https://www.devze.com 2022-12-09 14:52 出处:网络
Is there a way to turn ON UAC programmatically with C#? I know, everyone seems to want to kn开发者_开发问答ow how to turn it off. I want to be able to turn it on and restart the system.

Is there a way to turn ON UAC programmatically with C#? I know, everyone seems to want to kn开发者_开发问答ow how to turn it off. I want to be able to turn it on and restart the system.

Thanks


Registry key seems to be at HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System\EnableLUA

Easiest way that I know how to restart is "shutdown -r -t 01" You should be able to ShellExec it.

0

精彩评论

暂无评论...
验证码 换一张
取 消