I‘m reading wix’s tutorial and manuals, and trying to figure out how to apply a pre-installation detection, say detecting if Visual Studio 2012 and Update 2 has been installed on the machine.
the following is a wix source code, but I'm not sure whether the registry keys are prerequisite for detection.
<?xml version="1.0" encoding="utf-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:dd="http://schemas.microsoft.com/wix/2005/01/dd">
<!-- Detection keys fragment. -->
<Fragment>
<!-- TARGETDIR should be set by a type 51 CA to the root installation location for all products. -->
<DirectoryRef Id="TARGETDIR">
<!-- Use all variables in the full key path for the auto-generated GUID,
including LANG, since [ProductName] is lang-specific.
-->
<Component Id="Detection_Keys_Reg" Guid="$(autoguid.ComponentGuid(Detection_Keys_Reg,$(var.ProductFamily),$(var.ProductEdition),$(var.VSRegVer),$(var.Lang)))">
<RegistryKey Root="HKLM" Key="SOFTWARE\Microsoft\VisualStudio\$(var.VSRegVer)\Setup\[ProductName]">
<RegistryValue Id="Detection_Keys_RegKey_1" Name="InstallSuccess" Type="integer" Value="1" KeyPath="yes" />
<RegistryValue Id="Detection_Keys_RegKey_2" Name="SrcPath" Type="string" Value="[SourceDir]" />
</RegistryKey>
</Component>
</DirectoryRef>
<Feature Id="Detection_Keys" Absent="disallow" AllowAdvertise="no" Description="Used to detect product installation" Display="hidden" Level="1" InstallDefault="local" Title="Detection" TypicalDefault="install">
<ComponentRef Id="Detection_Keys_Reg" />
<dd:ExtensionData FeatureGuid="67DC7E25-1836-42AA-A0F8-6E85528D6986" InstallDirectory="TARGETDIR" AllowRunFromSource="no" FeatureGFN="DetectionKeys">Detection Keys</dd:ExtensionData>
</Feature>
</Fragment>
The two registry keys in folder
"HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\11.0_Config\Setup\Microsoft Visual Studio Ultimate 2012\"
do exist (but not in HKLM) after my installing VS2012. I don't understand some of the tags (still reading the manual)
so the questions are: 1. Is this for detection? 2. How do I write some pop up messages when the required software does not exist.
Can you provide some typical samples for this purpose?
Thanks!