title: Install KMDF programmatically using DiInstallDriver
body: <p>I want to install a kmdf driver on Windows 7 32bit machine. At first I used hdwwiz (the add hardware tool) and it worked correctly. </p>
  
  <p>Now I want to install it programmatically using a software. After some research I found <code>DiInstallDriver</code> I used the following code </p>
  
  <pre><code>int _tmain(int argc, _TCHAR* argv[])
  {
      std::wstring FilePath = L"&lt;file name&gt;.inf";
      bool result = DiInstallDriver(NULL, FilePath.c_str(), DIIRFLAG_FORCE_INF, false);
      DWORD error = GetLastError();
      if (!result){
          printf("The driver is not installed \r\n");
          printf("The error is %x ", error);
      }else
      {
          printf("The driver is installed correctly !");
      }
  
      getchar();
      return 0;
  }
  </code></pre>
  
  <p>After running the software I get "The driver is installed correctly !", that means the functions returns with success but I cannot find it in the Device Manager?</p>
  
  <p>Any idea what is going wrong ?</p>