Click here to Skip to main content
15,893,989 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
i want disable taskmaneger in C# with under code:

C#
RegistryKey objRegistryKey = Registry.CurrentUser.CreateSubKey(@"Software\Microsoft\Windows\CurrentVersion\Policies\System");
                objRegistryKey.SetValue("DisableTaskMgr", keyValue);
                objRegistryKey.Close();


text error when run time :
Additional information: Access to the registry key 'HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System' is denied.

Level Access need foul control....
i need code, ful control user for create subkey.
Posted

1 solution

As far as i know HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System registry node is not accessible for normal user. It needs admin rights to modify it.

Have a look here: Group Policy Registry Table[^]
 
Share this answer
 
Comments
[no name] 7-Jul-14 4:27am    
What if you gave it your admin privileges?
code C#.net

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900