Note that there are some explanatory texts on larger screens.

plurals
  1. POPreventing uninstallation of DIFxApp-installed drivers
    text
    copied!<p>I’m creating an installer for a software application that interfaces with a hardware device. The hardware device uses an <a href="http://www.ftdichip.com/Products/ICs/FT232R.htm" rel="nofollow">FTDI USB serial interface</a>. I need to install the <a href="http://www.ftdichip.com/Drivers/VCP.htm" rel="nofollow">FTDI USB drivers</a> (if the user doesn’t already have them) along with the software, and I’m using <a href="http://wixtoolset.org/" rel="nofollow">WiX</a> and the <a href="http://wix.sourceforge.net/manual-wix3/difxapp_xsd_driver.htm" rel="nofollow">DIFxApp extension</a> to accomplish this.</p> <p>So far, so good. That all works fine. I have separate MSI packages for my software and the 32-bit and 64-bit flavors of the drivers, and I’m using <a href="http://wix.sourceforge.net/manual-wix3/authoring_bundle_intro.htm" rel="nofollow">Burn</a> to bundle them all up into a single installer. The driver MSI packages deploy the driver files to a subdirectory of my application installation folder, and then DIFxApp installs the drivers to the appropriate system locations from there. (Which seems silly – they’re only used during install; why keep them hanging around after that? <a href="http://msdn.microsoft.com/en-us/library/windows/hardware/ff543652%28v=vs.85%29.aspx" rel="nofollow">A copy is kept in the system driver store, after all.</a> It would be preferable to extract them to a temporary folder, install the drivers, and then clean them up. But evidently, <a href="http://sourceforge.net/mailarchive/message.php?msg_id=29454351" rel="nofollow">that’s the way DIFxApp works</a>.)</p> <p>But the FTDI chipset is used by a lot of different devices, and it is likely that a user will own other devices that also require the FTDI drivers. In testing, I have found that DIFxApp uninstalls the drivers when the software is uninstalled. This is undesirable, because it will break any other FTDI-based devices the user owns, requiring the user to reinstall the drivers to get those devices working again.</p> <p>I would like DIFxApp to leave the drivers installed on the user’s system when my software is uninstalled so that removal of my software does not affect the user's other devices.</p> <p>I <em>could</em> do this by setting the <code>Permanent</code> attribute on the <a href="http://wix.sourceforge.net/manual-wix3/wix_xsd_msipackage.htm" rel="nofollow"><code>MsiPackage</code></a> or <a href="http://wix.sourceforge.net/manual-wix3/wix_xsd_component.htm" rel="nofollow"><code>Component</code></a> that installs the drivers, but that will prevent the driver files that were deployed to a subdirectory of my application installation folder from being cleaned up. I want those removed along with my application; I just don’t want the driver removed from the system driver store, etc.</p> <p>It also looks like I could accomplish what I want by installing the drivers with a <a href="http://www.codeproject.com/Articles/44191/Drivers-Installation-With-WiX" rel="nofollow">DPInst custom action</a>. And it looks like the DPInst approach would support installing the drivers from a temporary folder and not require the driver files to hang around in my application folder for eternity. This would seem to be the pragmatic solution, but evidently <a href="http://sourceforge.net/mailarchive/message.php?msg_id=29454866" rel="nofollow">DPInst is discouraged in favor of DIFxApp in MSI-based installers</a>.</p> <p>What is the “right” way to handle this?</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