VirtualBox

source: vbox/trunk/src/VBox/HostDrivers/win/load.sh@ 42699

Last change on this file since 42699 was 41841, checked in by vboxsync, 13 years ago

load.cmd/.sh: added scripts for loading the support driver on windows.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.7 KB
Line 
1#!/bin/bash
2## @file
3# For development, builds and loads all the host drivers.
4#
5
6#
7# Copyright (C) 2010-2011 Oracle Corporation
8#
9# This file is part of VirtualBox Open Source Edition (OSE), as
10# available from http://www.virtualbox.org. This file is free software;
11# you can redistribute it and/or modify it under the terms of the GNU
12# General Public License (GPL) as published by the Free Software
13# Foundation, in version 2 as it comes in the "COPYING" file of the
14# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16#
17
18MY_DIR=`cd "${0}/.." && cmd /c cd | kmk_sed -e 's,\\\\,/,g' `
19if [ ! -d "${MY_DIR}" ]; then
20 echo "Cannot find ${MY_DIR} or it's not a directory..."
21 exit 1;
22fi
23echo MY_DIR=$MY_DIR
24
25set -e
26cd "$MY_DIR"
27set +e
28
29
30#
31# Query the status of the drivers.
32#
33for drv in VBoxNetAdp VBoxNetFlt VBoxUSBMon VBoxUSB VBoxDrv;
34do
35 if sc query $drv > /dev/null; then
36 STATE=`sc query $drv \
37 | kmk_sed -e '/^ *STATE /!d' -e 's/^[^:]*: [0-9 ]*//' \
38 -e 's/ */ /g' \
39 -e 's/^ *//g' \
40 -e 's/ *$//g' \
41 `
42 echo "load.sh: $drv - $STATE"
43 else
44 echo "load.sh: $drv - not configured, probably."
45 fi
46done
47
48set -e
49set -x
50
51#
52# Invoke the uninstallers.
53#
54for uninst in NetAdpUninstall.exe NetFltUninstall.exe USBUninstall.exe SUPUninstall.exe;
55do
56 if test -f ${MY_DIR}/$uninst; then
57 ${MY_DIR}/$uninst
58 fi
59done
60
61#
62# Invoke the installer.
63#
64for inst in SUPInstall.exe;
65do
66 if test -f ${MY_DIR}/$inst; then
67 ${MY_DIR}/$inst
68 fi
69done
70
71echo "load.sh: Successfully installed SUPDrv (aka VBoxDrv)"
72exit 0
73
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette