Dear WiX Gurus [ I need to get this to work for the Product / .msi directly, not by using Bundle / Burn ] [ Using WiX 3.6 ]
---------------- Fragment that Puts Registry Value into a Variable ---------------- <?xml version="1.0" encoding="UTF-8"?> <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:util="http://schemas.microsoft.com/wix/UtilExtension"> <?include $(sys.CURRENTDIR)Deployment\Data\Statics.wxi ?> <Fragment> <util:RegistrySearch Root="HKCU" Key="$(var.Line.Reg.Path)" Value="Version" Variable="AppAlreadyInstalled" /> </Fragment> </Wix> ---------------- Main Product with Non-Working Condition ---------------- <Product Name="$(var.App.Title)" Manufacturer="!(loc.Company)" Language="!(loc.Lang)" Id="*" Version="$(var.VersionNumber)" UpgradeCode="$(var.App.UpgradeCode)"> <Package Id="*" InstallerVersion="300" Compressed="yes" InstallScope="$(var.App.Elevation)" InstallPrivileges="limited" /> <DirectoryRef Id="TARGETDIR" /> <MajorUpgrade Schedule="afterInstallValidate" DowngradeErrorMessage="!(loc.Msi.NewerVersionInstalled)" /> <Property Id='DiskPrompt' Value="$(var.App.Title) Installation Media" /> <Media Id="1" Cabinet="Media.cab" EmbedCab="yes" DiskPrompt="#1" /> <Icon Id="AppIcon" SourceFile="$(var.Icon.Path)" /> <Condition Message="Newer version already installed."> <![CDATA[Installed OR AppAlreadyInstalled]]> </Condition> <Feature Id="ProductFeature" Level="1"> ... </Feature> </Product> ---------------- Issues ---------------- I believe AppAlreadyInstalled is never set at the moment because it is in a fragement in a different file? Then I actually want the installation to proceed if the registry value is NOT found at all / does not exist ? But if it does it exist, I would like the installation to proceed only if the registry value is below a certain value e.g. proceed with installation only if AppAlreadyInstalled < 1.3.44; this sounds hard to achieve because the registry value is stored as a string with two full-stops / periods? Note the registry check is not of the app to-be-installed, which is already taken care of by DowngradeErrorMessage Ta, Kristjan ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users