title: How to register/start driver over MSI installer (WiX Toolset)
body: <p>I have an existing Windows driver (<code>Driver.sys</code>, <code>Driver.inf</code>, <code>Driver.cat</code>). The driver is already signed by Microsoft and is functional tested with systools like <code>devcon</code>, <code>OSRLoader</code> and <code>dbgview</code>.</p>
  <p><strong>Goal</strong>: I want to create a MSI package to install/register/start the driver - also the uninstall functionality.</p>
  <p>I used the WiX Toolset for creating the MSI package. Therefore I defined a <code>Product.wxs</code> file and I used the WiX extension <code>Difxapp</code>, because it is a driver.</p>
  <p><em>Product.wxs</em></p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
  &lt;Wix xmlns=&quot;http://schemas.microsoft.com/wix/2006/wi&quot; xmlns:difx=&quot;http://schemas.microsoft.com/wix/DifxAppExtension&quot;&gt;
    &lt;Product Name=&quot;DriverSetup&quot; Id=&quot;5c9f78b9-29c1-48dd-adcf-e1d68f6f4bf3&quot; Language=&quot;1033&quot; Codepage=&quot;1252&quot; Version=&quot;1.0&quot; Manufacturer=&quot;COMPANY&quot; UpgradeCode=&quot;5a44746b-6ff9-49b1-a2be-2fe707f5e9b1&quot;&gt;
      &lt;Package Id=&quot;*&quot; Keywords=&quot;Driver&quot; Description=&quot;Driver Installer&quot; Comments=&quot;Installs Driver&quot; Manufacturer=&quot;COMPANY&quot; InstallerVersion=&quot;100&quot; Languages=&quot;1033&quot; Compressed=&quot;yes&quot; SummaryCodepage=&quot;1252&quot; /&gt;
      &lt;Media Id=&quot;1&quot; Cabinet=&quot;Driver.cab&quot; EmbedCab=&quot;yes&quot; DiskPrompt=&quot;Driver Media&quot; /&gt;
      &lt;Property Id=&quot;DiskPrompt&quot; Value=&quot;Driver Install Media&quot; /&gt;
      &lt;Directory Id=&quot;TARGETDIR&quot; Name=&quot;SourceDir&quot;&gt;
        &lt;Directory Id=&quot;ProgramFilesFolder&quot;&gt;
          &lt;Directory Id=&quot;INSTALLDIR&quot; Name=&quot;DriverApp&quot;&gt;
            &lt;Directory Id=&quot;DriverAppDrivers&quot; Name=&quot;Drivers&quot;&gt;
              &lt;Directory Id=&quot;DriverDir&quot; Name=&quot;Driver&quot;&gt;
                &lt;Component Id=&quot;DriverDriver&quot; Guid=&quot;fd58a3ef-9e7d-4ae4-98c1-e990c5203a48&quot;&gt;
                  &lt;File Id=&quot;DriverSYS&quot; Name=&quot;Driver.sys&quot; DiskId=&quot;1&quot; Source=&quot;driver/Driver.sys&quot; KeyPath=&quot;yes&quot; /&gt;
                  &lt;File Id=&quot;DriverINF&quot; Name=&quot;Driver.inf&quot; DiskId=&quot;1&quot; Source=&quot;driver/Driver.inf&quot; /&gt;
                  &lt;File Id=&quot;DriverCAT&quot; Name=&quot;Driver.cat&quot; DiskId=&quot;1&quot; Source=&quot;driver/Driver.cat&quot; /&gt;
                  &lt;difx:Driver Legacy=&quot;yes&quot; /&gt;
                &lt;/Component&gt;
              &lt;/Directory&gt;
            &lt;/Directory&gt;
          &lt;/Directory&gt;
        &lt;/Directory&gt;
      &lt;/Directory&gt;
      &lt;Feature Id=&quot;Complete&quot; Level=&quot;1&quot;&gt;
        &lt;ComponentRef Id=&quot;DriverDriver&quot; /&gt;
      &lt;/Feature&gt;
      &lt;UIRef Id=&quot;WixUI_Minimal&quot; /&gt;
    &lt;/Product&gt;
  &lt;/Wix&gt;
  </code></pre>
  <p>With created MSI package the driver will be installed in default driver path in Windows <code>C:\Windows\DriverStore\FileRepository\</code>. That works.</p>
  <p><strong>Question</strong></p>
  <p>How can I define the registration / start process of the Windows driver inside the <code>wxs</code> structure, so that the driver can be registered and started in the MSI installation process? Or do I have to write a separate executable for this?</p>
  <p><em>Note: Manually I can register the driver via <code>devcon.exe</code> (from Windows Driver Kit) - this already works. I am just trying to make this process working within the MSI installation.</em></p>