Archive: Reading Reg_Multi_SZ when building with Unicode NSIS


Reading Reg_Multi_SZ when building with Unicode NSIS
Hi all,

i need to read a REG_Multi_SZ string and i am using NSIS Unicode (2.42-1).

Sadly neither the Registry Plugin nor the "REG_MULTI_SZ Reader" can do it with the Unicode Build, if i build the same Script with Ansi NSIS it works just nice.

Does anyone have an idea how to Read the REG_Multi_SZ when utilizing Unicode NSIS? A code snipped would be much appreciated.

Btw. i am trying to read

Key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server
Value: InstalledInstances

Thanks :)


the REG MULTI SZ Reader sample should work, just change the A to a W (or even removing the A should work) ex: RegCloseKeyA -> RegCloseKeyW


Ok i have adjusted the Script as you recommended and actually i do get something back but not what i have expected.

The registry Value contains 2 Strings "SQLEXRESS" and "SQLEINST2" and i get back:


SQLEXPRESS
刀䔀匀匀
SS
Completed


刀䔀匀匀 (this is actually displayed as 4 squares, checking against unicoide.org it reveals that it seems to be 0000)

I tried switching all the "t" to "w" but that did not help either, and it does not make a difference if i do RegCloseKeyW or RegCloseKey.

Any Ideas?


sorry, just switching the function did not help, turns out it does direct memory location changes, so everything is off by *2 bytes, I fixed the wiki entry, try with the new code


Sorry for the late answer, only got to test it today.

It works nice, thanks a lot!!!!!