I have a value in the registry of type REG_SZ in the key HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\ CurrentVersion\\Run
The registry entry looks like this.
Now i want to delete this from the registry so ive used the commands
Is there anything immediately obviously wrong with this?Code:HKEY hKey RegOpenKeyEx( HKEY_LOCAL_MACHINE,TEXT("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run"),0, KEY_ALL_ACCESS, &hKey); RegDeleteValue(hKey,"MyProg"); RegCloseKey(hKey);
I also checked its Error_Success of the RegDeleteValue and it does not return ERROR_SUCCESS so it must not be deleting correctly.
Thanks for any help