ait/os/bin/opensecurityd/vm-start.vbs
author om
Tue, 12 Nov 2013 11:31:34 +0100
branchom
changeset 2 c9bf2537109a
permissions -rwxr-xr-x
added C/C++ and Python sources
om@2
     1
Option Explicit
om@2
     2
om@2
     3
' ------------------------------------------------------------
om@2
     4
' start the VMs in the background and mount "network" shares
om@2
     5
'
om@2
     6
' Autor: Oliver Maurhart, <oliver.maurhart@ait.ac.at>
om@2
     7
'
om@2
     8
' Copyright (C) 2013 AIT Austrian Institute of Technology
om@2
     9
' AIT Austrian Institute of Technology GmbH
om@2
    10
' Donau-City-Strasse 1 | 1220 Vienna | Austria
om@2
    11
' http://www.ait.ac.at
om@2
    12
' ------------------------------------------------------------
om@2
    13
om@2
    14
Dim cShell
om@2
    15
Dim nError
om@2
    16
om@2
    17
' get the Windows Scripting Host Shell
om@2
    18
Set cShell = CreateObject("WScript.Shell")
om@2
    19
 
om@2
    20
' Start the VM
om@2
    21
cShell.Run """C:\\Program Files\\Oracle\\VirtualBox\\VBoxManage.exe"" startvm ""Debian 7"" --type headless", 0, True
om@2
    22
om@2
    23
' Mount the VM Internal "Downloads" folder
om@2
    24
Do 
om@2
    25
	nError = cShell.Run("net view \\192.168.56.15", 0, True)
om@2
    26
	If nError <> 0 Then
om@2
    27
		WScript.Sleep 100
om@2
    28
	End If
om@2
    29
Loop While nError <> 0
om@2
    30
nError = cShell.Run("net use Z: \\192.168.56.15\Downloads", 0, True)