Hi everybody,
I'm new to C++ but i made a program that counts how meny times i reboot my computer. Pritty simple but fun.
Now i want to make an uninstaller but it uses a reg key to start with windows.
HKEY_LOCAL_MACHINE,"Software\\Microsoft\\Windows\\CurrentVersion\\Run\\Counter" etc.
But how can I delete this reg-key by code to let it stop starting with my pc and "uninstalling it".
I allready did some searching but cant really understand:
The msdn database tells me 2 things:
1. RegDeleteKey delete's the key with all its sub-keys and
2.that he can only delete a key without sub-keys.
And i cant really get it working since im new to the reg. part.
1 2 3
|
HKEY hKey; //Always needed when working with the reg.
RegOpenKeyEx(HKEY_LOCAL_MACHINE,"Software\\Microsoft\\Windows\\CurrentVersion\\Run",0,KEY_SET_VALUE,&hKey );
//Im lost from here
|
Hope you understand.
Sorry for the grammar, my english is not that good (i'm from holland)
Hope someone can help.
Thanx,
Matthijs