I'm using the following code to disable task manager :
RegistryKey regKey;
string subKey = @"Software\Microsoft\Windows\CurrentVersion\Policies\System";
regKey = Registry.CurrentUser.CreateSubKey(subKey);
regKey.SetValue("DisableTaskMgr", 1);
regKey.Close();
My program is running with admin rights. When I run it on non-admin user (I enter the password of an admin user to run it), it doesn't work (the registry key is created successfully, but task manager isn't disabled). When I run it on admin user, it does work.
Does anyone have a solution for this?