C# basic programming help
2015-11-25, 04:38 PM,
How can i delete a registry key like this when i press a button using a command in c#?


[Image: banner300x250.png]
Share This Thread :

2015-11-25, 10:15 PM,
Hello Fierce, I made a little program, I hope it makes what you want.

• I have used Visual Studio 2010.
• At least .NET Framework 4 is needed.
• Execute with administrator privileges, otherwise it will throw an error.

Here you can see a couple screenshots:

[Image: BmY9sY3.png]

[Image: wFbOahk.png]

Here you can see the source code:

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Microsoft.Win32;

namespace DelReg
    public partial class FRM_Main : Form
        public FRM_Main()

        private void BTN_Delete_Click(object sender, EventArgs e)
            bool success = delete();

            if (success)
                MessageBox.Show("The registry key has been successfully deleted.", "Success!", MessageBoxButtons.OK, MessageBoxIcon.Information);
                MessageBox.Show("The registry key you want to delete does not exist.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);

        bool delete()
            RegistryKey rk = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Policies\Folder\Folder");

            if (rk == null)
                return false;
                return true;

Click here to download the binary file.

Name: DelReg.exe
CRC-32: 350ebea3
   MD4: 479e832e2a102ffe7aea7d6b6f0f919d
   MD5: 542df72551a136ca9d07978000c0c944
SHA-1: 95c2f21b743d220196f85c7c575a5f1b88f1e22f

Click here to download the project files.
Click here to see the virus scan.
Latest Thanks - View all

Quobi(2016-04-21 02:28 AM) 

Related Threads
Thread Author Replies Views Last Post
  I'm searching for an online course regarding bot programming maxyman 25 807 2018-01-21, 12:54 AM
Last Post: omoss20
  Visual studio/basic miamor 6 337 2017-03-07, 10:37 PM
Last Post: miamor
  Visual Basic Question ObsidianConnect 2 334 2017-02-24, 10:52 PM
Last Post: imonambot
  CPAGrip MediaFire Locker Help! Basic Coding Skills f1rew1re 3 485 2017-02-05, 11:27 PM
Last Post: f1rew1re
  Programming business, what's the best place? SmoothDollars 6 665 2016-05-18, 04:09 PM
Last Post: SmoothDollars

About Us | Contact Us | CPA Elites | Advertise | Stats | Staff Team

© 2013-2018 CPA Elites Ltd
Enhanced by MyBB and WallBB
Return to top