Ok, this isn't creating a key or a value =/
Meh, know what's wrong?Code:HKEY tmpKey = NULL;
const char * REG_KEY_NAME = "\\*\\shellex\\ContextMenuHandler\\SHA1-Hash";
const char * REG_VALUE_NAME = "command";
char key[512];
ZeroMemory(key, 512);
strcat(key, "\"");
strcat(key, GetCommandLine());
strcat(key, "\" \"%1\"");
if (RegCreateKeyEx(HKEY_CLASSES_ROOT, REG_KEY_NAME, 0, NULL, REG_OPTION_NON_VOLATILE, KEY_SET_VALUE, NULL, &tmpKey, NULL) == ERROR_SUCCESS)
if (RegSetValueEx(tmpKey, REG_VALUE_NAME, 0, REG_SZ, (const BYTE *)key, (DWORD)strlen(key)) != ERROR_SUCCESS)
MessageBox(NULL, "Can't create registry thing", "shyte", MB_OK);