
My best attempt to delete both the SampleMalware key and its value abcdef IS: < /p>
Код: Выделить всё
#include
#include
static const std::string REGISTRY_KEY_PATH =
"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run";
LSTATUS DeleteSampleMalwareRegistryKey() {
HKEY hKey;
LSTATUS status = RegOpenKeyExA(HKEY_LOCAL_MACHINE,
REGISTRY_KEY_PATH.c_str(),
0,
KEY_SET_VALUE,
&hKey);
if (status != ERROR_SUCCESS) {
return status;
}
std::string path = REGISTRY_KEY_PATH + "\\SampleMalware";
return RegDeleteKeyA(hKey, path.c_str());
}
Система не может найти указанный файл.
>
Подробнее здесь: https://stackoverflow.com/questions/796 ... s-registry