report error in log for WriteReg* when RegSetValueEx itself fails and not only RegCreateKeyEx

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@4980 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
kichik 2007-03-06 21:22:37 +00:00
parent 9fc8466b7c
commit faac838b4e

View file

@ -1210,11 +1210,19 @@ static int NSISCALL ExecuteEntry(entry *entry_)
LogData2Hex(binbuf, sizeof(binbuf), data, size);
log_printf5("WriteRegBin: \"%s\\%s\" \"%s\"=\"%s\"",rkn,buf1,buf0,binbuf);
}
if (size >= 0 && RegSetValueEx(hKey,buf0,0,rtype,data,size) == ERROR_SUCCESS)
{
exec_error--;
}
else
{
log_printf3("WriteReg: error writing into \"%s\\%s\" \"%s\"",rkn,buf1,buf0);
}
RegCloseKey(hKey);
}
else { log_printf3("WriteReg: error creating key \"%s\\%s\"",buf3,buf1); }
else { log_printf3("WriteReg: error creating key \"%s\\%s\"",rkn,buf1); }
}
break;
case EW_READREGSTR: // read registry string