Problem using search result as Pre-launch condition. - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

marcelo
Posts: 103
Joined: Fri Sep 28, 2007 2:07 pm

Problem using search result as Pre-launch condition.

Hi

I would like to add Visual C++ 2005 redist as a Launch condition on my MSI Package.

So I tried adding a Registry search for:
Root: Local Machine
Key: SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Products\F942F94A19C0F79468FD2B85E5E8677B\InstallProperties
Name: DisplayName
Type: Retreive the raw value
Checked "Search the 64bit portion of the registry too."
Named this search: VC2005REDIST32OR64INSTALLED

Then added this search on the Additional Launch Condition as:
Condition: VC2005REDISTX86INSTALLED
Description: You do not have Microsoft Visual C++ 2005 Redistributable package installed. Please refer to the Installation Guide for the location of any missing packages.\nThe installation process will abort.

The search works (when I test it).

But when I run the setup, it always show me the message "You do not have ... "

Also is there a way to force a line break on the descriptions? (Note that there is a "\n" on the Description, but that doesn't seem to work.

Thanks,
Marcelo
Last edited by marcelo on Thu Dec 13, 2007 2:38 pm, edited 1 time in total.
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Hi,

In order to find out if Visual C++ 2005 is present on the target computer you can use a search for this component:

Code: Select all

{28A38374-4A68-4562-9AF3-5D7BB96B0461}
You can create this search by using the "New Search" and "Add Location" -> "Component" menus.

You can read more about detecting versions of Visual Studio here:
http://msdn2.microsoft.com/en-us/librar ... S.80).aspx
Also is there a way to force a line break on the descriptions? (Note that there is a "\n" on the Description, but that doesn't seem to work.
I'm afraid that this cannot be done because this text is handled by Windows Installer.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
marcelo
Posts: 103
Joined: Fri Sep 28, 2007 2:07 pm

Hi Cosmin,

I think you misunderstood me, on my last post.. I don't need to check if "VC ++ 2005" is installed, i need to know if "Visual C++ 2005 Redistributable Package (x86)" is installed.

the Component ID you provided me seems to be VS2005 C++ component?

Thanks,
Marcelo
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Hi,

For more information about how to detect the presence of the VC 8.0 runtime redistributable package please see this page:
http://blogs.msdn.com/astebner/archive/ ... ckage.aspx

Note that for the "Additional Launch Condition" you must use the same property you use in the search (I noticed that in the search you use the property VC2005REDIST32OR64INSTALLED and for the launch condition you use a different property: VC2005REDISTX86INSTALLED)

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
marcelo
Posts: 103
Joined: Fri Sep 28, 2007 2:07 pm

Hi Cosmin, that was completly my mistake, the problem was the properties name all along! :S When I saw I could search for the values on the 64bit portion of the registry, i quickly changed the name of the search, but forgot to change that on the Launch Conditions.

It works properly now.

Thanks for pointing that out!
Marcelo

Return to “Common Problems”