sbrown_el
Posts: 20
Joined: Wed Dec 05, 2012 4:07 pm

Selective Registry Updates

Our client-server app requires a common set of registry entries, for both the client and server components, as well as a set of registry entries specifically for the server

They are arranged as

HKLM\Software\OurApp\ <- main "shared" entries are under this key
HKLM\Software\OurApp\Server\ <- server specific keys

("OurApp" isnt the real key name)

I've added all the necessary keys/values into the registry manager, and then thinking that this was the way to achieve this, clicked on the "OurApp", and chose "Move to Feature", specifying the "Common" feature. I then chose the "Server1" key, and did the same, specifying "Server" as the feature.

However, when run, the keys and values show up under both client and server installs.

Its not a large number of key/values - and I could easily script them as a custom action - but I would hope that there would be a better/easier way...
Eusebiu
Posts: 4959
Joined: Wed Nov 14, 2012 2:04 pm

Re: Selective Registry Updates

Hi,

In order to achieve what you want you must select the component that contains the "Server1" key from the "Server" feature and from the "Feature Properties" pane set the condition for this component to be installed only under server install.

The How do I show a custom feature selection dialog? article might help you.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
sbrown_el
Posts: 20
Joined: Wed Dec 05, 2012 4:07 pm

Re: Selective Registry Updates

Eusebiu wrote:Hi,

In order to achieve what you want you must select the component that contains the "Server1" key from the "Server" feature and from the "Feature Properties" pane set the condition for this component to be installed only under server install.
The condition has to be set on each key? Ok - I've a small number of keys, so this isnt a big deal - but what benefit does the "Move to Feature" provide? I would have thought that moving them to be part of the "Server" feature would have made them part of the "Server" install set, just as moving files to the "Server" file set makes those files only install for a "Server" installation. Not very intuitive really...
Eusebiu
Posts: 4959
Joined: Wed Nov 14, 2012 2:04 pm

Re: Selective Registry Updates

Hi,

The benefit of "Move to Feature" option is that the related key component will be moved under the feature you chose. You can see it in the Organization page.

If you chose our "Client/Server Application" template to create your project your scenario must work well by following the next steps:
- specify a product name and a product manufacturer (optional)
- select the "MSI setup file" radio button
- choose the location where you want to save your project
- in the "Configure your package structure" dialog, check the "Create a single installer" radio button
- click "Finish"
- go in the Registry page
- create values in HKLM\Software\OurApp\
- create a key "Server" in HKLM\Software\OurApp\
- create values in HKLM\Software\OurApp\Server\
- click on "OurApp" key and choose "Move to Feature", specifying "Common" feature
- click on "Server" key and move it to "Server" feature
- build and run your project

If you go in the Organization page you can see that the values under "OurApp" key will be added to "Common" feature and the values under "Server" key will be added to "Server" feature.

When you install the application the components under the "Common" feature will be installed every time, but the components under "Server" feature will not be installed if you choose the "Client" option from the "Choose Installation Type" dialog.

Let us know if it helped, otherwise give us more details about your scenario.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”