473,405 Members | 2,185 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

C# App: How to SetValueSubKey for "DisableTaskMgr" on registry

28
I have a function:
Expand|Select|Wrap|Line Numbers
  1. private void HideTaskPanel()
  2.         {
  3.             //lay goc la HKEY_CURRENT_USER
  4.             RegistryKey RootKey = Registry.CurrentUser;
  5.             //lay subkey
  6.             RootKey.OpenSubKey("Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\System",true);
  7.  
  8.             RootKey.SetValue("DisableTaskMgr",1);
  9.             RootKey.Close();
  10.         }
when testing on registry, I not found "DisableTaskMgr", can you help me to write that value on registry.
Thanks
Nov 16 '07 #1
15 4941
thupham
28
I have repair it in new code:
Expand|Select|Wrap|Line Numbers
  1. Microsoft.Win32.RegistryKey regKey = Microsoft.Win32.Registry.CurrentUser.CreateSubKey("Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\System");
  2.             regKey.SetValue("DisableTaskMgr", 1);
  3.             regKey.Close();
  4.  
but it appear new message box:
"Task Manager has been disable by your administrator"
I want to hide this message box, can you show me??
Nov 16 '07 #2
CyberSoftHari
487 Expert 256MB
Can you explain how it is showing the message box? Your code looks good.

You can change this like

Expand|Select|Wrap|Line Numbers
  1. Microsoft.Win32.RegistryKey regKey = SomeAssignment;
Like

Expand|Select|Wrap|Line Numbers
  1. using Microsoft.Win32; // at the add class part 
  2.  
  3. private void mymethod()
  4. {
  5.     RegistryKey regKey = SomeAssignment;
  6. }
Nov 16 '07 #3
Frinavale
9,735 Expert Mod 8TB
I have repair it in new code:
Expand|Select|Wrap|Line Numbers
  1. Microsoft.Win32.RegistryKey regKey = Microsoft.Win32.Registry.CurrentUser.CreateSubKey("Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\System");
  2.             regKey.SetValue("DisableTaskMgr", 1);
  3.             regKey.Close();
  4.  
but it appear new message box:
"Task Manager has been disable by your administrator"
I want to hide this message box, can you show me??
Is there a problem with this message popping up?
It seems to me that you would really want to inform the user that your code has disabled the task manager.

Please explain what you are trying to do in more detail.
Nov 16 '07 #4
thupham
28
I want to prevent user press Ctrl+Alt+Del, but I can't. So I want to hide task manager. but it appears an message box. I don't want so. Can you help me ??
Thanks
Nov 20 '07 #5
CyberSoftHari
487 Expert 256MB
You are bit lazy to describe your problem. You done the code for disable Task manager and asking to disable the message box. But I am not getting any message box some one may get,let me know!
Can you explain what you done and when and where it is showing the message box?
Nov 20 '07 #6
are u trying to create some kinda spyware :)
Nov 20 '07 #7
thupham
28
Please read my last post, I'm not lazy and not write spyware, that's problem in my project. Can you read carefully the question upper, and you will know.
I use the code before to hide task manager when you press Ctrl+Alt+Del. I write a key in registry, you can review the code before. But after I write that key success, I press Ctrl+Alt+Del, the appear a pop up message "Task Manager has been disable by your administrator", and I want to hide pop up message. How to do that???
Nov 22 '07 #8
CyberSoftHari
487 Expert 256MB
Okay, What is your windows version?
In XP you will not get this messagebox.
Nov 22 '07 #9
The1corrupted
134 100+
Okay, What is your windows version?
In XP you will not get this messagebox.
Strange, I got a bit of spyware that did just this. I run Windows XP and I still got the message >.> Of course, it was spyware, so I murdered it with a stick.
Nov 22 '07 #10
checkout this post:
Task Manager Disabled Registry Key

it doesnt give the vb.net code but it gives you the exact registry key that needs to be
added/deleted in order to show/hide task manager


hope this helps
Nov 22 '07 #11
thupham
28
Okay, What is your windows version?
In XP you will not get this messagebox.
Oh, what's a pity. I use Win XP Professional version 2002 Service Pack 2. But it also appear that pop up message. How to hide popup message by C#???.
Thu
Nov 23 '07 #12
CyberSoftHari
487 Expert 256MB
I don’t know why it’s not popping for me! I Never changed your code.
Nov 23 '07 #13
Shashi Sadasivan
1,435 Expert 1GB
use the SendKey Class to simulate tab/enter keys to communicate with the pop up box, and subside it
Nov 23 '07 #14
thupham
28
use the SendKey Class to simulate tab/enter keys to communicate with the pop up box, and subside it
Can you explain more about using the SendKey Class to simulate tab/enter keys to communicate with the pop up box. How will we write it in C#??
Nov 23 '07 #15
Shashi Sadasivan
1,435 Expert 1GB
In your C# class, type in
SendKeys.Send("{TAB}");
It shows up in intellisense so you will not miss it.
Though of the class is not a form type then you will have to use the namesapce System.Windows.Form
the rest is explanatory.

Search online on how to send commands using this (like enter, shift+Tab, etc)
Nov 23 '07 #16

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.