ait/os/bin/opensecurityd/vm-start.vbs
branchom
changeset 2 c9bf2537109a
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/ait/os/bin/opensecurityd/vm-start.vbs	Tue Nov 12 11:31:34 2013 +0100
     1.3 @@ -0,0 +1,30 @@
     1.4 +Option Explicit
     1.5 +
     1.6 +' ------------------------------------------------------------
     1.7 +' start the VMs in the background and mount "network" shares
     1.8 +'
     1.9 +' Autor: Oliver Maurhart, <oliver.maurhart@ait.ac.at>
    1.10 +'
    1.11 +' Copyright (C) 2013 AIT Austrian Institute of Technology
    1.12 +' AIT Austrian Institute of Technology GmbH
    1.13 +' Donau-City-Strasse 1 | 1220 Vienna | Austria
    1.14 +' http://www.ait.ac.at
    1.15 +' ------------------------------------------------------------
    1.16 +
    1.17 +Dim cShell
    1.18 +Dim nError
    1.19 +
    1.20 +' get the Windows Scripting Host Shell
    1.21 +Set cShell = CreateObject("WScript.Shell")
    1.22 + 
    1.23 +' Start the VM
    1.24 +cShell.Run """C:\\Program Files\\Oracle\\VirtualBox\\VBoxManage.exe"" startvm ""Debian 7"" --type headless", 0, True
    1.25 +
    1.26 +' Mount the VM Internal "Downloads" folder
    1.27 +Do 
    1.28 +	nError = cShell.Run("net view \\192.168.56.15", 0, True)
    1.29 +	If nError <> 0 Then
    1.30 +		WScript.Sleep 100
    1.31 +	End If
    1.32 +Loop While nError <> 0
    1.33 +nError = cShell.Run("net use Z: \\192.168.56.15\Downloads", 0, True)