Phil,

Thanks for reply. Do you refer to this

   1. Call the MsiQueryProductState
      <http://msdn2.microsoft.com/en-gb/library/aa370363.aspx> API
   2. Pass in the product code for the package that you want to detect
      based on the list below
   3. Check the return value of this API.  If it is anything other than
      INSTALLSTATE_DEFAULT, the package is not yet installed

How do I call this API? Aaron describes this as the procedure in the 
VS2005 redistributable bootstrapper.
- How do I add this to the wixproj file that defines the bootstrapper 
built with Votive and MSBuild?
- How can I ensure in my .MSI that the bootstrapper has been started to 
install the redistributable if necessary?

But this article and the link to the corresponding VS2005 article 
http://blogs.msdn.com/b/astebner/archive/2007/01/16/mailbag-how-to-detect-the-presence-of-the-vc-8-0-runtime-redistributable-package.aspx
 
show some GUIDs that I found after installing the redistributable 
version. This could be used to find it in the registry. But I would use 
a better approach if possible.

Regards,
Helge

Am 12.12.2011 21:53, schrieb Wilson, Phil:
> You need something like this, not a registry search.
>
> http://blogs.msdn.com/b/astebner/archive/2010/05/05/10008146.aspx
>
> Phil W
>
> ________________________________________
> From: Helge Kruse [helge.kr...@gmx.net]
> Sent: Sunday, December 11, 2011 11:11 AM
> To:wix-users@lists.sourceforge.net
> Subject: [WiX-users] Detect VC++ runtime version on target system
>
> The WiX help recommends to deploy the Visual C++ runtime using merge
> modules. I refer to section "How To: Install the Visual C++
> Redistributable with your installer". While this is possible, I don't
> want to include the MSM in every MSI I will generate. Instead I prefer
> to add this to the bootstrapper with Votive and MSBuild.
>
> But this would allow installing a C++ program that might will not run,
> when the bootstrapper is not used but the MSI is ran directly. Therefore
> I would like to check if the required version of the C++ run time is
> installed on the target system. This could be done with a
> RegistrySearch. But this allows only accessing registry values. I would
> like to do something like this:
>
> <Property Id="VC80_CRT_762">
> <RegistrySearch Id="Vc80_Crt_762" Root="HKLM"
> Key="SOFTWARE\Microsoft\Windows\CurrentVersion\SideBySide\Installations\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.762_x-ww_e889b656\downlevel_manifest.8.0.50727.4407"
> Name="?????" Type"=raw" />
> </Property>
>
> <Condition Message="This application needs a newer version of the VC++
> run time.">
> <![CDATA[Installed OR VC80_CRT_76"]]>
> </Condition>
>
> How can the condition distinguish between "an empty default value" and
> "key not in registry"?
> How can this test achieved?
> What is the best way to check that the required or a newer version of
> the VC++ runtime is installed?
>
> Regards,
> Helge
>    


------------------------------------------------------------------------------
Systems Optimization Self Assessment
Improve efficiency and utilization of IT resources. Drive out cost and 
improve service delivery. Take 5 minutes to use this Systems Optimization 
Self Assessment. http://www.accelacomm.com/jaw/sdnl/114/51450054/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to