Index: trunk/src/VBox/HostDrivers/win/load.cmd
===================================================================
--- trunk/src/VBox/HostDrivers/win/load.cmd	(revision 79405)
+++ trunk/src/VBox/HostDrivers/win/load.cmd	(revision 79406)
@@ -2,5 +2,5 @@
 rem $Id$
 rem rem @file
-rem Windows NT batch script for launching load.sh
+rem Windows NT batch script for loading the support driver.
 rem
 
@@ -28,25 +28,80 @@
 
 setlocal ENABLEEXTENSIONS
+setlocal ENABLEDELAYEDEXPANSION
 setlocal
 
+
 rem
-rem loadall.sh should be in the same directory as this script.
+rem find the directory we're in.
 rem
-set MY_SCRIPT=%~dp0load.sh
-if exist "%MY_SCRIPT%" goto found
+set MY_DIR=%~dp0
+if exist "%MY_DIR%\load.cmd" goto dir_okay
 echo load.cmd: failed to find load.sh in "%~dp0".
 goto end
 
+:dir_okay
 rem
-rem Found it, convert slashes and tell kmk_ash to interpret it.
+rem We don't use the driver files directly any more because of win10 keeping the open,
+rem so create an alternative directory for the binaries.
 rem
-:found
-set MY_SCRIPT=%MY_SCRIPT:\=/%
-set MY_ARGS=%*
-if ".%MY_ARGS%." NEQ ".." set MY_ARGS=%MY_ARGS:\=/%
-kmk_ash %MY_SCRIPT% %MY_ARGS%
+set MY_ALTDIR=%MY_DIR%\..\LoadedDrivers
+if not exist "%MY_ALTDIR%" mkdir "%MY_ALTDIR%"
+
+rem
+rem Display device states.
+rem
+for %%i in (VBoxNetAdp VBoxNetAdp6 VBoxNetFlt VBoxNetLwf VBoxUSBMon VBoxUSB VBoxDrv) do (
+    set type=
+    for /f "usebackq tokens=*" %%f in (`sc query %%i`) do (set xxx=%%f&&if "!xxx:~0,5!" =="STATE" set type=!xxx!)
+    for /f "usebackq tokens=2 delims=:" %%f in ('!type!') do set type=%%f
+    if "!type!x" == "x" set type= not configured, probably
+    echo load.sh: %%i -!type!
+)
+
+rem
+rem Copy uninstallers and installers and VBoxRT into the dir:
+rem
+echo **
+echo ** Copying installers and uninstallers into %MY_ALTDIR%...
+echo **
+set MY_FAILED=no
+for %%i in (NetAdpUninstall.exe NetAdp6Uninstall.exe USBUninstall.exe NetFltUninstall.exe NetLwfUninstall.exe SUPUninstall.exe ^
+            NetAdpInstall.exe   NetAdp6Install.exe   USBInstall.exe   NetFltInstall.exe   NetLwfInstall.exe   SUPInstall.exe ^
+            VBoxRT.dll) do if exist "%MY_DIR%\%%i" (copy "%MY_DIR%\%%i" "%MY_ALTDIR%\%%i" || set MY_FAILED=yes)
+if "%MY_FAILED%" == "yes" goto end
+
+rem
+rem Unload the drivers.
+rem
+echo **
+echo ** Unloading drivers...
+echo **
+for %%i in (NetAdpUninstall.exe NetAdp6Uninstall.exe USBUninstall.exe NetFltUninstall.exe NetLwfUninstall.exe SUPUninstall.exe) do (
+    if exist "%MY_ALTDIR%\%%i" (echo ** Running %%i...&& "%MY_ALTDIR%\%%i")
+)
+
+rem
+rem Copy the driver files into the directory now that they no longer should be in use and can be overwritten.
+rem
+echo **
+echo ** Copying drivers into %MY_ALTDIR%...
+echo **
+set MY_FAILED=no
+for %%i in (VBoxDrv.sys VBoxDrv.inf VBoxDrv.cat) do if exist "%MY_DIR%\%%i" (copy "%MY_DIR%\%%i" "%MY_ALTDIR%\%%i" || set MY_FAILED=yes)
+if "%MY_FAILED%" == "yes" goto end
+
+rem
+rem Invoke the installer if asked to do so.
+rem
+if "%1%" == "-u" goto end
+if "%1%" == "--uninstall" goto end
+echo **
+echo ** Loading drivers...
+echo **
+for %%i in (SUPInstall.exe) do "%MY_ALTDIR%\%%i" || goto end
 
 :end
 endlocal
 endlocal
+endlocal
 
Index: trunk/src/VBox/HostDrivers/win/load.sh
===================================================================
--- trunk/src/VBox/HostDrivers/win/load.sh	(revision 79405)
+++ 	(revision )
@@ -1,88 +1,0 @@
-#!/bin/bash
-## @file
-# For development, loads the support driver.
-#
-
-#
-# Copyright (C) 2010-2019 Oracle Corporation
-#
-# This file is part of VirtualBox Open Source Edition (OSE), as
-# available from http://www.virtualbox.org. This file is free software;
-# you can redistribute it and/or modify it under the terms of the GNU
-# General Public License (GPL) as published by the Free Software
-# Foundation, in version 2 as it comes in the "COPYING" file of the
-# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
-# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
-#
-# The contents of this file may alternatively be used under the terms
-# of the Common Development and Distribution License Version 1.0
-# (CDDL) only, as it comes in the "COPYING.CDDL" file of the
-# VirtualBox OSE distribution, in which case the provisions of the
-# CDDL are applicable instead of those of the GPL.
-#
-# You may elect to license modified versions of this file under the
-# terms and conditions of either the GPL or the CDDL or both.
-#
-
-if test -n "$Path" -a -z "$PATH"; then
-    export PATH="$Path"
-fi
-
-MY_DIR=`cd "${0}/.." && cmd /c cd | kmk_sed -e 's,\\\\,/,g' `
-if [ ! -d "${MY_DIR}" ]; then
-    echo "Cannot find ${MY_DIR} or it's not a directory..."
-    exit 1;
-fi
-echo MY_DIR=$MY_DIR
-
-set -e
-cd "$MY_DIR"
-set +e
-
-
-#
-# Query the status of the drivers.
-#
-for drv in VBoxNetAdp VBoxNetAdp6 VBoxNetFlt VBoxNetLwf VBoxUSBMon VBoxUSB VBoxDrv;
-do
-    if sc query $drv > /dev/null; then
-        STATE=`sc query $drv \
-               | kmk_sed -e '/^ *STATE /!d' -e 's/^[^:]*: [0-9 ]*//' \
-                         -e 's/  */ /g' \
-                         -e 's/^ *//g' \
-                         -e 's/ *$//g' \
-              `
-        echo "load.sh: $drv - $STATE"
-    else
-        echo "load.sh: $drv - not configured, probably."
-    fi
-done
-
-set -e
-set -x
-
-#
-# Invoke the uninstallers.
-#
-for uninst in NetAdpUninstall.exe NetAdp6Uninstall.exe USBUninstall.exe NetFltUninstall.exe NetLwfUninstall.exe SUPUninstall.exe;
-do
-    if test -f ${MY_DIR}/$uninst; then
-        ${MY_DIR}/$uninst
-    fi
-done
-
-#
-# Invoke the installer.
-#
-if test "$1" != "-u" -a "$1" != "--uninstall"; then
-    for inst in SUPInstall.exe;
-    do
-        if test -f ${MY_DIR}/$inst; then
-            ${MY_DIR}/$inst
-        fi
-    done
-fi
-
-echo "load.sh: Successfully installed SUPDrv (aka VBoxDrv)"
-exit 0
-
