title: Installing .inf file in Windows 10/migrating away from snetcfg.exe
body: <p>I am the maintainer of Portable-VirtualBox. A wrapper for VirtualBox to make it easy to take virtual machines with you on a USB stick. To do so we have to load some drivers from VirtualBox when a user starts the portable version on a new machine.</p>
  
  <p>Currently we have been using snetcfg.exe to load .inf files. Unfortunately snetcfg.exe dos not work on Windows 10, but I have not been able to figure out how to install this driver in an different way.</p>
  
  <p>This is the code used today:</p>
  
  <pre><code>      If @OSArch = "x86" Then
          RunWait (@ScriptDir&amp;"\data\tools\snetcfg_x86.exe -v -u sun_VBoxNetFlt", @ScriptDir, @SW_HIDE)
          RunWait (@ScriptDir&amp;"\data\tools\snetcfg_x86.exe -v -l .\"&amp; $arch &amp;"\drivers\network\netflt\VBoxNetFlt.inf -m .\"&amp; $arch &amp;"\drivers\network\netflt\VBoxNetFltM.inf -c s -i sun_VBoxNetFlt", @ScriptDir, @SW_HIDE)
        EndIf
        If @OSArch = "x64" Then
          RunWait (@ScriptDir&amp;"\data\tools\snetcfg_x64.exe -v -u sun_VBoxNetFlt", @ScriptDir, @SW_HIDE)
          RunWait (@ScriptDir&amp;"\data\tools\snetcfg_x64.exe -v -l .\"&amp; $arch &amp;"\drivers\network\netflt\VBoxNetFlt.inf -m .\"&amp; $arch &amp;"\drivers\network\netflt\VBoxNetFltM.inf -c s -i sun_VBoxNetFlt", @ScriptDir, @SW_HIDE)
        EndIf
        FileCopy (@ScriptDir&amp;"\"&amp; $arch &amp;"\drivers\network\netflt\VBoxNetFltNobj.dll", @SystemDir, 9)
        FileCopy (@ScriptDir&amp;"\"&amp; $arch &amp;"\drivers\network\netflt\VBoxNetFlt.sys", @SystemDir&amp;"\drivers", 9)
        RunWait (@SystemDir&amp;"\regsvr32.exe /S "&amp; @SystemDir &amp;"\VBoxNetFltNobj.dll", @ScriptDir, @SW_HIDE)
  </code></pre>
  
  <p>The .inf files used are here: <a href="http://runarb.com/div/netflt/" rel="nofollow">http://runarb.com/div/netflt/</a></p>
  
  <p>Any advise on how to install this driver automatically in Windows 10? </p>