2

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.

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.

This is the code used today:

      If @OSArch = "x86" Then
        RunWait (@ScriptDir&"\data\tools\snetcfg_x86.exe -v -u sun_VBoxNetFlt", @ScriptDir, @SW_HIDE)
        RunWait (@ScriptDir&"\data\tools\snetcfg_x86.exe -v -l .\"& $arch &"\drivers\network\netflt\VBoxNetFlt.inf -m .\"& $arch &"\drivers\network\netflt\VBoxNetFltM.inf -c s -i sun_VBoxNetFlt", @ScriptDir, @SW_HIDE)
      EndIf
      If @OSArch = "x64" Then
        RunWait (@ScriptDir&"\data\tools\snetcfg_x64.exe -v -u sun_VBoxNetFlt", @ScriptDir, @SW_HIDE)
        RunWait (@ScriptDir&"\data\tools\snetcfg_x64.exe -v -l .\"& $arch &"\drivers\network\netflt\VBoxNetFlt.inf -m .\"& $arch &"\drivers\network\netflt\VBoxNetFltM.inf -c s -i sun_VBoxNetFlt", @ScriptDir, @SW_HIDE)
      EndIf
      FileCopy (@ScriptDir&"\"& $arch &"\drivers\network\netflt\VBoxNetFltNobj.dll", @SystemDir, 9)
      FileCopy (@ScriptDir&"\"& $arch &"\drivers\network\netflt\VBoxNetFlt.sys", @SystemDir&"\drivers", 9)
      RunWait (@SystemDir&"\regsvr32.exe /S "& @SystemDir &"\VBoxNetFltNobj.dll", @ScriptDir, @SW_HIDE)

The .inf files used are here: http://runarb.com/div/netflt/

Any advise on how to install this driver automatically in Windows 10?

Runar Buvik
  • 45
  • 1
  • 5

1 Answers1

0

You could use the sc command as described here. It will work fine on all new Windows Platforms. For the inf, this (and/or this) could be relevant.

Community
  • 1
  • 1
Megachip
  • 359
  • 3
  • 13
  • Any suggestion on with what parameters to run the sc command? I have tried running this: `sc create VBoxNetFlt binpath="C:\temp\Portable-VirtualBox\app64\drivers\network\netflt\VBoxNetFlt.sys" type=kernel start=auto error=normal displayname=PortableVBoxNetFlt` It give me a successful response, but it appear that that is not correct, because bridged networking still fails with the same error. I have also tried to inspect the driver status with Nirsoft InstalledDriversList , and her the driver shows up, but is listed as not loaded. Maybe I have to do something in addition to running sc? – Runar Buvik Nov 10 '15 at 20:36
  • `sc start VBoxNetFlt`? – Megachip Nov 11 '15 at 12:02
  • sc start VBoxNetFlt fails like this: `[SC] StartService FAILED 1058: The service cannot be started, either because it is disabled or because it has no enabled devices associated with it.` – Runar Buvik Nov 11 '15 at 22:16