jcagle
25th July 2003 04:31 UTC
ReadRegBin...or alternate method?
From searching the forum and NSIS documentation, it appears that there is no ReadRegBin. Is that true? If so, does someone have an alternate method to reading a binary registry key? Actually, all I need to know is if the key exists...I've been using ReadRegStr, for example, to read a string key, then check the return string to determine if it's "" or not. If someone has a better way of determining if a key exists...I'm all ears!!!! Thanks much!!!
Vytautas
25th July 2003 08:04 UTC
Hmm... Thats strange :weird: WriteRegBin exists but ReadRegBin does not. I wonder if there was a reason they left that out of NSIS?
Vytautas
Sunjammer
25th July 2003 09:44 UTC
Actually, all I need to know is if the key exists...I've been using ReadRegStr, for example, to read a string key, then check the return string to determine if it's "" or not.
From the docs for ReadRegStr:
The error flag will be set and $x will be set to an empty string ("") if the string is not present.So, IfErrors should do what you want.
kichik
25th July 2003 11:00 UTC
It also sets the error flag if the type is not matched (not SZ_REG, REG_DWORD or REG_EXPAND_SZ). To find out if the key exists use EnumRegValue.
ReadRegBin is not available because values from there can contain null characters and it's impossible to process this data with normal string functions.