JimDel
JimDel

Reputation: 4359

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

Is there a way to turn ON UAC programmatically with C#? I know, everyone seems to want to know how to turn it off. I want to be able to turn it on and restart the system.

Thanks

Upvotes: 0

Views: 444

Answers (1)

popester
popester

Reputation: 1934

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.

Upvotes: 1

Related Questions