No announcement yet.

REG_MULTI_SZ and 'registry' plugin

  • Filter
  • Time
  • Show
Clear All
new posts

  • REG_MULTI_SZ and 'registry' plugin

    Could someone please give an example for searching REG_MULTI_SZ values using 'registry.dll' plugin?

    I'm searching for
    in "InstalledInstances"
    in "HKLM\Software\Microsoft\Microsoft SQL Server".
    If "MyMSDEInstance" is found, I need 1, ohterwise 0, that's it.

    The documentation on 'registry' plugin is so brief, it's almost useless. Could not find a working example anywhere. So, please help.

  • #2
    If you need to know if the key exists, you could use this:

    ${registry::KeyExists} "HKLM\Software\Microsoft\Microsoft SQL Server\InstalledInstances\MyMSDEInstance" $R0

    It returns 0 if found, -1 if not, so you might want to do
    IntOp $R0 $R0 + 1

    I'm not sure I fully understand your question though. Is "MyMSDEInstance" a possible value of "InstalledInstances"?


    • #3
      Is "MyMSDEInstance" a possible value of "InstalledInstances"?
      InstalledInstances may contain a few items. It's not just a one possible string value. It's more like a string list. REG_MULTI_SZ is quite rare. There is an example "How to Read REG_MULTI_SZ Values" in NSIS docs, but it's very plumpy. I gave it up and just search for specific MSDE service. Works like a charm.