Note that there are some explanatory texts on larger screens.

plurals
  1. POVisual Studio 2008 Installer - Java prerequisite in Product Manifest
    text
    copied!<p>I would like to create an installer for a Java application using Visual Studio 2008 Installer</p> <p>I have followed the instructions for creating a prerequisite using the tool Bootstrapper Manifest Generator.<br> <a href="http://msdn.microsoft.com/en-us/library/ee335701.aspx" rel="nofollow">How to: Create a Product Manifest</a></p> <p>I want to create a prerequisite that will install Java if not present on the machine.</p> <p>To do so, I check the registry Key: HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment\CurrentVersion</p> <p>And I test if the CurrentVersion is >= 1.7.</p> <p>The product.xml generated is the following:</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;Product ProductCode="Java1.7" xmlns="http://schemas.microsoft.com/developer/2004/01/bootstrapper"&gt; &lt;PackageFiles CopyAllPackageFiles="false"&gt; &lt;PackageFile Name="jre-7u45-windows-x64.exe" /&gt; &lt;/PackageFiles&gt; &lt;InstallChecks&gt; &lt;RegistryCheck Property="Java_Version" Key="HKLM\Software\JavaSoft\Java Runtime Environment" Value="CurrentVersion" /&gt; &lt;/InstallChecks&gt; &lt;Commands Reboot="Defer"&gt; &lt;Command PackageFile="jre-7u45-windows-x64.exe"&gt; &lt;InstallConditions&gt; &lt;BypassIf Property="Java_Version" Compare="VersionGreaterThanOrEqualTo" Value="1.7" /&gt; &lt;/InstallConditions&gt; &lt;ExitCodes&gt; &lt;ExitCode Value="0" Result="Success" /&gt; &lt;ExitCode Value="3010" Result="Success" /&gt; &lt;DefaultExitCode Result="Fail" String="Anunexpectedexitcodewasr" FormatMessageFromSystem="true" /&gt; &lt;/ExitCodes&gt; &lt;/Command&gt; &lt;/Commands&gt; &lt;/Product&gt; </code></pre> <p>I generate the installer using this prerequisite (VS 2008), but if I run the installer on a Machine with the Java already installed, the installer asks me to install Java!</p> <p>The ByPassIf instructions is ignored for some reasons. I have checked whether the registry key does exist obviously ...</p> <p>Any Idea?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload