The way I read your IF statement is like this: if a value named Host1 exists in HKLM\Software\Vendor\Application, then replace 2 other values in the same key.
I don't have sufficient understanding of what you are trying to do to be sure that this is what you had in mind. Anyway, when I try the same IF statement in a little test, it seems to work right. I created a key called HKLM\Software\JB\Test, in which I created a value with name = "Host1" and data = "xyz". Then I tried this IF statement:
IF SEARCH(Registry, "HKEY_LOCAL_MACHINE\SOFTWARE\JB\Test", "Host1", "AppHost1")
ASK1: Yesno, text="True, the value of Host1 is $AppHost1$"
ASK1: Yesno, text="False"
When I ran this, the IF evaluated True and I got a MessageBox that said "True, the value of Host1 is xyz". If the key (HKLM\Software\JB\Test) or value name aren't found, the IF evaluates false.
You may notice a little difference between your syntax and mine: you have "$AppHost1$", I have "AppHost1". I've tried both, they both work the same.
Thanks for the clarification on using the option I had chosen - I just had selected the wrong one. This morning I found I just had to select the third option, "Search registry for a value with matching data, starting at key. Search string can begin and/or end with a wildcard "*".
IF SEARCH(Registry Recurse ByData, "HKEY_LOCAL_MACHINE\SOFTWARE\Vendor\Application", "host1", "", "RemoteHost")
KEY: query, "HKEY_LOCAL_MACHINE\SOFTWARE\Vendor\Application"
VALUE: reg_sz, replace, "NetworkDir", "\\newhost1\appdata"
VALUE: reg_sz, replace, "RemoteHost", "newhost1"
I had a section for each of my 20 original hosts and the package was able to locate and replace each of them. Hope I can remember this for next time!