This doesn't work for you
RegDBSetKeyValueEx("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall" ^PRODUCT_GUID, "EstimatedSize", REGDB_NUMBER, "nsize", -1);
No wonder
nsize
is the value you wish to write to the registry key,
but you're writing the string
"nsize"
to the registry key.
You have to convert nsize to a string and then use that string.