PDA

View Full Version : Does System Search actually work?



Paulaner
08-17-2005, 03:33 PM
Hopefully this is a simple question. I'm new to Installshileld 11, but I have written few InstallScript installers in Installshield 7.5 a couple years ago. I am creating a Basic MSI installer and trying to follow good practices.

What I would like to to is lookup the value in the registry, and assign this to a property as a default value just before I present it to the user in a dialog edit box. Specifically, I want to look up "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ProxyServer" and put that into a property called PROXY_SERVER, then let the user edit this (if desired).

Originally I looked to see if registry keys were an intrinsic feature of the Custom Action "Set Property", but it looks like I can only use predefined properties and constants in this space. (Right?)

I thought about creating a VBScript custom action, but that seems like overkill (and opens the door to trouble if the customer has locked down VBScript).

I found the "System Search" tool, and this looked like the easiest way to populate a property with a registry key. Using the wizard, I created a search for this key and specified that the value of key gets dropped into PROXY_SERVER property. Sounds good, but it doesn’t work. I see the address stored in the key via RegEdit, and double-checked the key name in the search table. Do I need to schedule this search somehow in the sequence?

Any hints on how to use “System Search” correctly, or better ideas on how to drop a registry value into a property are welcomed. Thanks.

RobertDickau
08-17-2005, 04:56 PM
The System Search view should be the right tool for the job. Perhaps try using it to read from an easier-to-find key, and see if that works? Creating an MSI log file will tell you the property's value (msiexec /i product.msi /Lp properties.log), or use [YOUR_PROP_NAME] in a dialog box, or MsgBox Property("YOUR_PROP_NAME") in a VBScript custom action...

Paulaner
08-18-2005, 01:01 PM
I figured out the problem. In the “System Search” wizard it asks for 3 fields: Registry Root, Registry Key, and Registry Value (Optional). I misunderstood the field “Registry Value”, and had left this blank because I appended the value to the key. Once I got the data separated into the 3 fields correctly, it works fine.

The correct config for proxy server is:
Root: HKEY_CURRENT_USER
Key: Software\Microsoft\Windows\CurrentVersion\Internet Settings
Value: ProxyServer