Changeset 79406 in vbox for trunk/src/VBox
- Timestamp:
- Jun 28, 2019 10:43:24 AM (6 years ago)
- Location:
- trunk/src/VBox/HostDrivers/win
- Files:
-
- 1 deleted
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/win/load.cmd
r76553 r79406 2 2 rem $Id$ 3 3 rem rem @file 4 rem Windows NT batch script for l aunching load.sh4 rem Windows NT batch script for loading the support driver. 5 5 rem 6 6 … … 28 28 29 29 setlocal ENABLEEXTENSIONS 30 setlocal ENABLEDELAYEDEXPANSION 30 31 setlocal 31 32 33 32 34 rem 33 rem loadall.sh should be in the same directory as this script.35 rem find the directory we're in. 34 36 rem 35 set MY_ SCRIPT=%~dp0load.sh36 if exist "%MY_ SCRIPT%" goto found37 set MY_DIR=%~dp0 38 if exist "%MY_DIR%\load.cmd" goto dir_okay 37 39 echo load.cmd: failed to find load.sh in "%~dp0". 38 40 goto end 39 41 42 :dir_okay 40 43 rem 41 rem Found it, convert slashes and tell kmk_ash to interpret it. 44 rem We don't use the driver files directly any more because of win10 keeping the open, 45 rem so create an alternative directory for the binaries. 42 46 rem 43 :found 44 set MY_SCRIPT=%MY_SCRIPT:\=/% 45 set MY_ARGS=%* 46 if ".%MY_ARGS%." NEQ ".." set MY_ARGS=%MY_ARGS:\=/% 47 kmk_ash %MY_SCRIPT% %MY_ARGS% 47 set MY_ALTDIR=%MY_DIR%\..\LoadedDrivers 48 if not exist "%MY_ALTDIR%" mkdir "%MY_ALTDIR%" 49 50 rem 51 rem Display device states. 52 rem 53 for %%i in (VBoxNetAdp VBoxNetAdp6 VBoxNetFlt VBoxNetLwf VBoxUSBMon VBoxUSB VBoxDrv) do ( 54 set type= 55 for /f "usebackq tokens=*" %%f in (`sc query %%i`) do (set xxx=%%f&&if "!xxx:~0,5!" =="STATE" set type=!xxx!) 56 for /f "usebackq tokens=2 delims=:" %%f in ('!type!') do set type=%%f 57 if "!type!x" == "x" set type= not configured, probably 58 echo load.sh: %%i -!type! 59 ) 60 61 rem 62 rem Copy uninstallers and installers and VBoxRT into the dir: 63 rem 64 echo ** 65 echo ** Copying installers and uninstallers into %MY_ALTDIR%... 66 echo ** 67 set MY_FAILED=no 68 for %%i in (NetAdpUninstall.exe NetAdp6Uninstall.exe USBUninstall.exe NetFltUninstall.exe NetLwfUninstall.exe SUPUninstall.exe ^ 69 NetAdpInstall.exe NetAdp6Install.exe USBInstall.exe NetFltInstall.exe NetLwfInstall.exe SUPInstall.exe ^ 70 VBoxRT.dll) do if exist "%MY_DIR%\%%i" (copy "%MY_DIR%\%%i" "%MY_ALTDIR%\%%i" || set MY_FAILED=yes) 71 if "%MY_FAILED%" == "yes" goto end 72 73 rem 74 rem Unload the drivers. 75 rem 76 echo ** 77 echo ** Unloading drivers... 78 echo ** 79 for %%i in (NetAdpUninstall.exe NetAdp6Uninstall.exe USBUninstall.exe NetFltUninstall.exe NetLwfUninstall.exe SUPUninstall.exe) do ( 80 if exist "%MY_ALTDIR%\%%i" (echo ** Running %%i...&& "%MY_ALTDIR%\%%i") 81 ) 82 83 rem 84 rem Copy the driver files into the directory now that they no longer should be in use and can be overwritten. 85 rem 86 echo ** 87 echo ** Copying drivers into %MY_ALTDIR%... 88 echo ** 89 set MY_FAILED=no 90 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) 91 if "%MY_FAILED%" == "yes" goto end 92 93 rem 94 rem Invoke the installer if asked to do so. 95 rem 96 if "%1%" == "-u" goto end 97 if "%1%" == "--uninstall" goto end 98 echo ** 99 echo ** Loading drivers... 100 echo ** 101 for %%i in (SUPInstall.exe) do "%MY_ALTDIR%\%%i" || goto end 48 102 49 103 :end 50 104 endlocal 51 105 endlocal 106 endlocal 52 107
Note:
See TracChangeset
for help on using the changeset viewer.