Note that there are some explanatory texts on larger screens.

plurals
  1. POHaving difficulty installing a device driver (packaged in .exe) from my WiX installer
    primarykey
    data
    text
    <p>I've struggled through building a new WiX installer, and I'm really happy with it, except that I also need to install a device driver.</p> <p>Ideally, I'd like to be able to detect the presence of this driver by using <code>RegistrySearch</code>, e.g.</p> <pre><code>&lt;Property Id="DRIVERINSTALLED"&gt; &lt;RegistrySearch Id="DriverInstalledSearch" Root="HKLM" Key="SOFTWARE\DriverCompany\Settings" Name="InstallPath" Type="raw" /&gt; &lt;/Property&gt; </code></pre> <p>If there is a value for the InstallPath registry key, then I'd like to move ahead with the device driver installation. I haven't figured that part out yet, but that is secondary right now, because I can't even get the device driver to install every time.</p> <p>There are various examples floating around on the web, and the one corresponding to WiX v3.5 seems to follow this pattern:</p> <pre><code>&lt;CustomAction Id="InstallDeviceDrivers" Execute="deferred" Directory="INSTALLLOCATION" ExeCommand="setup.exe" Return="check" /&gt; . . . &lt;InstallExecuteSequence&gt; &lt;Custom Action="InstallDeviceDrivers" After="InstallFiles" /&gt; &lt;/InstallExecuteSequence&gt; </code></pre> <p>Whenever I run my msi, I get the error "a program required for this install to complete could not be run".</p> <p>setup.exe is copied to my INSTALLLOCATION, and I have verified this by looking in that folder when my msi fails.</p> <p>I played with the value of the <code>After</code> attribute, but <code>InstallFiles</code> seems to be the right one since it maintains elevated user privileges. I had originally tried <code>InstallFinalize</code>, but that failed and I figured that it wasn't running with elevated privileges. The problem is, none of the other Actions I have tried work.</p> <p>I then ran my installer with <code>msiexec /i installer.msi /l*v install.log</code> and looked over the output file. That's where I saw a slightly more specific error:</p> <pre><code>MSI (s) (74:CC) [14:06:10:098]: Executing op: ActionStart(Name=InstallDeviceDrivers,,) Action 14:06:10: InstallDeviceDrivers. MSI (s) (74:CC) [14:06:10:098]: Executing op: CustomActionSchedule(Action=InstallDeviceDrivers,ActionType=1058,Source=C:\Program Files\MyCompany\MyProduct\,Target=setup.exe,) MSI (s) (74:CC) [14:06:10:108]: Note: 1: 1721 2: InstallDeviceDrivers 3: C:\Program Files\MyCompany\MyProduct\ 4: setup.exe MSI (s) (74:CC) [14:06:10:108]: Note: 1: 2205 2: 3: Error MSI (s) (74:CC) [14:06:10:108]: Note: 1: 2228 2: 3: Error 4: SELECT `Message` FROM `Error` WHERE `Error` = 1721 Error 1721. There is a problem with this Windows Installer package. A program required for this install to complete could not be run. Contact your support personnel or package vendor. Action: InstallDeviceDrivers, location: C:\Program Files\MyCompany\MyProduct\, command: setup.exe MSI (s) (74:CC) [14:06:11:800]: Note: 1: 2205 2: 3: Error MSI (s) (74:CC) [14:06:11:800]: Note: 1: 2228 2: 3: Error 4: SELECT `Message` FROM `Error` WHERE `Error` = 1709 MSI (s) (74:CC) [14:06:11:800]: Product: Installer -- Error 1721. There is a problem with this Windows Installer package. A program required for this install to complete could not be run. Contact your support personnel or package vendor. Action: InstallDeviceDrivers, location: C:\Program Files\MyCompany\MyProduct\, command: setup.exe </code></pre> <p>Based off of some searching, it sounded like I just needed to run as admin, but my installer already triggers UAC... and sure enough, running the installer from an elevated command prompt didn't help.</p> <p>Can anyone recommend a next course of action for me to debug this? If you additionally have information on how to conditionally install based on the presence of a registry key, that would be really great, too. Thank you!</p> <p>EDIT -- I have run my installer on Windows XP 32bit and Windows 7 32bit, and it fails on both. Yet another reason to believe it's not permissions-related.</p> <p>EDIT #2 -- I don't know why I didn't try this before, but I changed from setup.exe to notepad.exe, and Notepad launched. So obviously the CustomAction works. I'll try again with Process Monitor to see where it's looking for setup.exe... or perhaps I just can't run an installer from within another installer?</p>
    singulars
    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