engg.mukesh
19th April 2010 12:00 UTC
How to check registry key type
I want to check that whether the registry key "Notification Packages" located at "HKLM\SYSTEM\ControlSet001\Control\Lsa" is of the type "String-Value (REG_SZ)" OR "MULTI-STRING VALUE (REG_MULTI_SZ)", using NSIS.
Please let me know how to do that.
Animaether
19th April 2010 12:37 UTC
http://nsis.sourceforge.net/Docs/AppendixD.html#D.5 - D.5 How to Read REG_MULTI_SZ Values
engg.mukesh
19th April 2010 13:11 UTC
The thing is before reading the registry entry I need to know that whether the registry is of type type "String-Value (REG_SZ)" OR "MULTI-STRING VALUE (REG_MULTI_SZ)".
In some system it is of type REG_SZ and others it is of type REG_MULTI_SZ.
Therefore, first of all I need to check the type and than accordingly read the previous value.
Anders
19th April 2010 13:21 UTC
NSIS will not let you check the type, use the registry plugin or call the registry api functions directly with the system plugin
Animaether
19th April 2010 13:21 UTC
Part of the example code checks whether the type is REG_MULTI_SZ (it's the first check, actually) - leverage that :)