Skip to content
⌘ NSIS Forum Archive

Registry Key Search

5 posts

e-novative#

Registry Key Search

Hi all,

I was not successful in finding a function or macro that finds a registry (sub)key in/below a given key based on a partial string match. Nothing turned up in the NSIS archive and forum, not even Google was my friend this time.

An example of what I am trying to do to clarify: I am installing some software from within my NSIS installer, and need to find this software's uninstall registry key. Since the software creates a registry key containing a version numer and/or release information, the exact name of the registry key is not known, thus I want to search for the first key with a name that contains a given string.

Is there a function or macro out there I could go with or can anybody point me in the right direction? Any help greatly is appreciated.

Kind regards,

Steve
Takhir#
You can enum registry keys and check first part of names using StrCmp. You can find sample in the NSIS manual, 4.9.2.5 EnumRegKey
e-novative#
This is a first pointer, thanks. But how can I perform a partial string match _anywhere_ in the string? Is there a macro or function for that?

Steve
Takhir#

BTW strstr using System plug-in also works 🙂