Note that there are some explanatory texts on larger screens.

plurals
  1. POHTA installer for MSI failing
    primarykey
    data
    text
    <p>I'm using a HTA to try to install a product using WindowsInstaller.Installer as an ActiveXObject. Using the same HTA model that has been used in the past, the attempt to install throws the error: "Msi API Error: InstallProduct,PackagePath,PropertyValues". </p> <p>I have tried this on both Windows Vista and Server 2003 with no success. Both have been using IE8, so I thought it might be some sort of ActiveX compatibility problem. I then tested it in IE6 and encountered the same problem - however, we have used this format for HTAs several times in the past with success. I am attempting to install from an Administrator account on both machines, and the MSI itself executes as expected.</p> <p>So far I have tried the following:</p> <ol> <li>Changing the file path for the MSI to absolute</li> <li>Changing the "command line settings" (the second parameter) for the InstallProduct method to "ACTION=ADMIN" (to force an administrator install) and "ACTION=INSTALL"</li> <li>Changing ActiveX settings in IE - "Initialise and script ActiveX controls not marked as safe for scripting" to "Prompt"</li> <li>Adding localhost to the trusted sites list in IE</li> <li>Adding compatibility meta tags to the HTA to run in IE7Emulation, IE5 or IE6 modes</li> </ol> <p>Here is the method/context that is failing:</p> <pre><code>var Software = new Array( new Array("..\\Software\\Product.msi", "ProductCode")); function run_msi(i) { try { //Execute MSI application install on error resume next var msi = new ActiveXObject("WindowsInstaller.Installer"); var installer = Software[i][0]; msi.UILevel = 5; // full interactive mode msi.InstallProduct(installer, ""); } catch (e) { alert ("Unable to launch the Installer Package. This may be because you do not have permission to install software."); } // Check the install status of the MSI to ensure it is in the registry RegistryKeyExists(i); } </code></pre> <p>The method is then called when clicking on an "install" button as follows</p> <p><code>&lt;td&gt;&lt;span class="link" style="display: none; visibility: hidden" id="SoftwareTextTrue0" onclick="javascript:run_msi(0);"&gt;Uninstall&lt;/span&gt; &lt;span class="link" style="display: none; visibility: hidden" id="SoftwareTextFalse0" onclick="javascript:run_msi(0);"&gt;Install&lt;/span&gt; &lt;/td&gt;</code></p> <p>I have Googled extensively and only found a related issue when someone was trying to install Silverlight 3 (which has apparently since been fixed). Any ideas?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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