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

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • thupham
    New Member
    • Oct 2007
    • 28

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

    I have a function:
    [code=cpp]
    private void HideTaskPanel()
    {
    //lay goc la HKEY_CURRENT_US ER
    RegistryKey RootKey = Registry.Curren tUser;
    //lay subkey
    RootKey.OpenSub Key("Software\\ Microsoft\\Wind ows\\CurrentVer sion\\Policies\ \System",true);

    RootKey.SetValu e("DisableTaskM gr",1);
    RootKey.Close() ;
    }[/code]

    when testing on registry, I not found "DisableTaskMgr ", can you help me to write that value on registry.
    Thanks
    Last edited by Frinavale; Nov 16 '07, 03:44 PM. Reason: Added [code] tags
  • thupham
    New Member
    • Oct 2007
    • 28

    #2
    I have repair it in new code:
    [code=cpp]
    Microsoft.Win32 .RegistryKey regKey = Microsoft.Win32 .Registry.Curre ntUser.CreateSu bKey("Software\ \Microsoft\\Win dows\\CurrentVe rsion\\Policies \\System");
    regKey.SetValue ("DisableTaskMg r", 1);
    regKey.Close();
    [/code]
    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??
    Last edited by Frinavale; Nov 16 '07, 03:44 PM. Reason: Added [code] tags

    Comment

    • CyberSoftHari
      Recognized Expert Contributor
      • Sep 2007
      • 488

      #3
      Can you explain how it is showing the message box? Your code looks good.

      You can change this like

      [CODE=cpp]Microsoft.Win32 .RegistryKey regKey = SomeAssignment;[/CODE]

      Like

      [CODE=cpp]using Microsoft.Win32 ; // at the add class part

      private void mymethod()
      {
      RegistryKey regKey = SomeAssignment;
      }[/CODE]

      Comment

      • Frinavale
        Recognized Expert Expert
        • Oct 2006
        • 9749

        #4
        Originally posted by thupham
        I have repair it in new code:
        [code=cpp]
        Microsoft.Win32 .RegistryKey regKey = Microsoft.Win32 .Registry.Curre ntUser.CreateSu bKey("Software\ \Microsoft\\Win dows\\CurrentVe rsion\\Policies \\System");
        regKey.SetValue ("DisableTaskMg r", 1);
        regKey.Close();
        [/code]
        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.

        Comment

        • thupham
          New Member
          • Oct 2007
          • 28

          #5
          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

          Comment

          • CyberSoftHari
            Recognized Expert Contributor
            • Sep 2007
            • 488

            #6
            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?

            Comment

            • painkiller
              New Member
              • Nov 2007
              • 17

              #7
              are u trying to create some kinda spyware :)

              Comment

              • thupham
                New Member
                • Oct 2007
                • 28

                #8
                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???
                Last edited by thupham; Nov 22 '07, 02:06 AM. Reason: Task Manager has been disable by your administrator"

                Comment

                • CyberSoftHari
                  Recognized Expert Contributor
                  • Sep 2007
                  • 488

                  #9
                  Okay, What is your windows version?
                  In XP you will not get this messagebox.
                  Last edited by CyberSoftHari; Nov 22 '07, 04:04 AM. Reason: In XP ......

                  Comment

                  • The1corrupted
                    New Member
                    • Feb 2007
                    • 134

                    #10
                    Originally posted by CyberSoftHari
                    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.

                    Comment

                    • painkiller
                      New Member
                      • Nov 2007
                      • 17

                      #11
                      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

                      Comment

                      • thupham
                        New Member
                        • Oct 2007
                        • 28

                        #12
                        Originally posted by CyberSoftHari
                        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

                        Comment

                        • CyberSoftHari
                          Recognized Expert Contributor
                          • Sep 2007
                          • 488

                          #13
                          I don’t know why it’s not popping for me! I Never changed your code.

                          Comment

                          • Shashi Sadasivan
                            Recognized Expert Top Contributor
                            • Aug 2007
                            • 1435

                            #14
                            use the SendKey Class to simulate tab/enter keys to communicate with the pop up box, and subside it

                            Comment

                            • thupham
                              New Member
                              • Oct 2007
                              • 28

                              #15
                              Originally posted by Shashi Sadasivan
                              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#??

                              Comment

                              Working...