cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
omidkrad
Level 4

Component condition based on a system search

I'm not sure why this is NOT working:

In a Merge Module project I have created a system search as follows:
Search for: Visual Studio 2008
Search in: [PersonalFolder]
Store in: VS2008DOCS

For the component I have:
Destination: [VS2008DOCS]Templates\ProjectTemplates
Condition: VS2008DOCS


meaning that if the search was successful (VS2008DOCS had a value), install the component at
[PersonalFolder]Visual Studio 2008\Templates\ProjectTemplates

However, it looks like the condition always evaluates to false and this installs nothing. If I remove the condition the component is installed to the right place but if the search fails it installs to TARGETDIR which I don't want. I want the component to install only when the search is successful. I don't know how to debug merge modules. Any ideas what is wrong?


Thanks,
Omeed
Labels (1)
0 Kudos
(5) Replies
Gvarma
Level 7

omidkrad wrote:
I'm not sure why this is NOT working:

In a Merge Module project I have created a system search as follows:
Search for: Visual Studio 2008
Search in: [PersonalFolder]
Store in: VS2008DOCS

For the component I have:
Destination: [VS2008DOCS]Templates\ProjectTemplates
Condition: VS2008DOCS


meaning that if the search was successful (VS2008DOCS had a value), install the component at
[PersonalFolder]Visual Studio 2008\Templates\ProjectTemplates

However, it looks like the condition always evaluates to false and this installs nothing. If I remove the condition the component is installed to the right place but if the search fails it installs to TARGETDIR which I don't want. I want the component to install only when the search is successful. I don't know how to debug merge modules. Any ideas what is wrong?


Thanks,
Omeed


You have two options

1. Run your installer with /v verbose switch and check the log file see if you could find the error

2. simplest thing would be to say in CONDITION of your component (MM) VS2008DOCS != "" and keep your DESTINATION as it is in the same component.

HTH
0 Kudos
omidkrad
Level 4

Someone helped me fix it. The solution was I had to add the merge module ID (GUID) to the VS2008DOCS property, so it looks something like this in the final MSI

Condition: VS2008DOCS .0CB67C87_CD34_43E3_92C0_6091F902D467


I'm not sure exactly why, but that fixed it.

Thanks
0 Kudos
Christopher_Pai
Level 16

The merge module specification says that property names in MM's should get their guid appended to avoid namespace collisions in the event other merge modules share the same property name.
0 Kudos
Ray_Portrait
Level 6

surely this is a short term solution due to the fact that the MM guid will change if MS recompiles the MM? Is there a better way of determining if VS 2008 is installed through a system search? My requirements are a little different as all I want to do is determine if VS2008 is installed.
0 Kudos
omidkrad
Level 4

You may want to do a system search on the registry for VS 2008's devenv

See http://www.acresso.com/webdocuments/PDF/is_install_dir_from_app_search.pdf
0 Kudos