How delete registry key?

If I add file to registry startup by:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include <stdio.h>
#include <windows.h>
using namespace std;
int main(){

	HKEY hkey;
	LONG regOpenResult;
	const char PATH[] = "C:\\svchost.exe"; /*This is
							     the path of
							     your program*/

	regOpenResult = RegOpenKeyEx(HKEY_LOCAL_MACHINE,
				     "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run",
				     0,
				     KEY_ALL_ACCESS,
				     &hkey);

	RegSetValueEx(hkey,
		      "Random name", //This is the name that shows up in your registry
		      0,
		      REG_SZ,
		      (BYTE*)PATH,
		      strlen(PATH));

	RegCloseKey(hkey);

	return 0;
}

How can I delete it?
Last edited on
closed account (48bpfSEw)
Did you allready scanned every corner in the web? ^^

http://stackoverflow.com/questions/16175752/deleting-keys-from-registy

Thanx I found it
Topic archived. No new replies allowed.