VMware in Sandboxie

  • Hallo.

    Ich möchte VMware in Sandboxie laufen lassen. Aus Sicherheitsgründen habe ich das ausführen von Scripten wie .cmd .bat oder .vbs auf dem System blockiert. Deshlab möchte ich ein Autoit Script als .exe laufen lassen.

    Beim ausführen soll ein Fenster mit dem Text:"VMware Prozesse in Sandboxie" erscheinen. Mit dem Button "Starten" sollen einige VMware Prozesse über Sandboxie gestartet werden und mit "Beenden" sollen sie wieder geschlossen werden.

    Die Prozesse die gestrartet werden sollen, habe ich aus den Verknüpfungen. Ich weiß nicht wie man sie in ein Autoit Script umwandelt.

    Code
    "C:\Program Files\Sandboxie\Start.exe" /box:DefaultBox "C:\Program Files (x86)\VMware\VMware Workstation\hqtray.exe"
    "C:\Program Files\Sandboxie\Start.exe" /box:DefaultBox "C:\Program Files (x86)\VMware\VMware Workstation\vmnat.exe"
    "C:\Program Files\Sandboxie\Start.exe" /box:DefaultBox "C:\Program Files (x86)\VMware\VMware Workstation\VMnetDHCP.exe"
    "C:\Program Files\Sandboxie\Start.exe" /box:DefaultBox "C:\Program Files (x86)\VMware\VMware Workstation\vmware-authd.exe"
    "C:\Program Files\Sandboxie\Start.exe" /box:DefaultBox "C:\Program Files (x86)\Common Files\VMware\USB\vmware-usbarbitrator.exe"
    "C:\Program Files\Sandboxie\Start.exe" /box:DefaultBox "C:\Program Files (x86)\VMware\VMware Workstation\vmware-ufad.exe" -d "C:\Program Files (x86)\VMware\VMware Workstation\\" -s ufad-p2v.xml
    "C:\Program Files\Sandboxie\Start.exe" /box:DefaultBox "C:\Program Files (x86)\VMware\VMware Workstation\x64\vmware-vmx.exe"
    "C:\Program Files\Sandboxie\Start.exe" /box:DefaultBox "C:\Program Files (x86)\VMware\VMware Workstation\vmware.exe"

    4 Mal editiert, zuletzt von Tibripri (11. Januar 2012 um 17:06)

  • Ein Teil mit GUI habe ich hingekriegt.
    Die Schrift muss noch irgendwie größer gemacht werden.

    [autoit]


    #include <GUIConstantsEx.au3>

    [/autoit][autoit][/autoit][autoit]

    _Main()

    [/autoit][autoit][/autoit][autoit]

    Func _Main()
    Local $StartenID, $BeendenID, $msg

    [/autoit][autoit][/autoit][autoit]

    GUICreate("VMware Prozesse", 210, 80)

    [/autoit][autoit][/autoit][autoit]

    GUICtrlCreateLabel("VMware Prozesse in Sandboxie", 20, 20)
    $StartenID = GUICtrlCreateButton("Starten", 10, 50, 50, 20)
    $BeendenID = GUICtrlCreateButton("Beenden", 140, 50, 50, 20)

    [/autoit][autoit][/autoit][autoit]

    GUISetState() ; display the GUI

    [/autoit][autoit][/autoit][autoit]

    While 1
    $msg = GUIGetMsg()

    [/autoit][autoit][/autoit][autoit]

    Select
    Case $msg = $StartenID
    MsgBox(0, "", "Prozesse werden gestartet")
    Case $msg = $BeendenID
    MsgBox(0, "", "Prozesse werden beendet")
    Case $msg = $GUI_EVENT_CLOSE
    ExitLoop
    EndSelect
    WEnd
    EndFunc ;==>_Main

    [/autoit]

    Jetzt muss ich noch irgendwie die Verknüpfung starten. Ein Teil der Verknüpfung kann ich mit dem Befehl Run starten.

    [autoit]


    Run("C:\Program Files\Sandboxie\Start.exe","",@SW_MINIMIZE)

    [/autoit]


    Wie man den anderen Teil anhängt weiß ich auch nicht.

    Einmal editiert, zuletzt von Tibripri (10. Januar 2012 um 00:28)

  • So sollte es klappen:

    Spoiler anzeigen
    [autoit]

    #include <GUIConstantsEx.au3>
    Global $aCommands[8][2]
    $aCommands[0] = '"C:\Program Files\Sandboxie\Start.exe " /box:DefaultBox "C:\Program Files (x86)\VMware\VMware Workstation\hqtray.exe"'
    $aCommands[1] = '"C:\Program Files\Sandboxie\Start.exe " /box:DefaultBox "C:\Program Files (x86)\VMware\VMware Workstation\vmnat.exe"'
    $aCommands[2] = '"C:\Program Files\Sandboxie\Start.exe " /box:DefaultBox "C:\Program Files (x86)\VMware\VMware Workstation\VMnetDHCP.exe"'
    $aCommands[3] = '"C:\Program Files\Sandboxie\Start.exe " /box:DefaultBox "C:\Program Files (x86)\VMware\VMware Workstation\vmware-authd.exe"'
    $aCommands[4] = '"C:\Program Files\Sandboxie\Start.exe " /box:DefaultBox "C:\Program Files (x86)\Common Files\VMware\USB\vmware-usbarbitrator.exe"'
    $aCommands[5] = '"C:\Program Files\Sandboxie\Start.exe " /box:DefaultBox "C:\Program Files (x86)\VMware\VMware Workstation\vmware-ufad.exe" -d "C:\Program Files (x86)\VMware\VMware Workstation\\" -s ufad-p2v.xml'
    $aCommands[6] = '"C:\Program Files\Sandboxie\Start.exe " /box:DefaultBox "C:\Program Files (x86)\VMware\VMware Workstation\x64\vmware-vmx.exe"'
    $aCommands[7] = '"C:\Program Files\Sandboxie\Start.exe " /box:DefaultBox "C:\Program Files (x86)\VMware\VMware Workstation\vmware.exe"'

    [/autoit] [autoit][/autoit] [autoit]

    _Main()

    [/autoit] [autoit][/autoit] [autoit]

    Func _Main()
    Local $StartenID, $BeendenID, $msg

    [/autoit] [autoit][/autoit] [autoit]

    GUICreate("VMware Prozesse", 210, 80)

    [/autoit] [autoit][/autoit] [autoit]

    GUICtrlCreateLabel("VMware Prozesse in Sandboxie", 20, 20)
    $StartenID = GUICtrlCreateButton("Starten", 10, 50, 50, 20)
    $BeendenID = GUICtrlCreateButton("Beenden", 140, 50, 50, 20)

    [/autoit] [autoit][/autoit] [autoit]

    GUISetState() ; display the GUI

    [/autoit] [autoit][/autoit] [autoit]

    While 1
    $msg = GUIGetMsg()

    [/autoit] [autoit][/autoit] [autoit]

    Select
    Case $msg = $StartenID
    MsgBox(0, "", "Prozesse werden gestartet")
    For $i = 0 To UBound($aCommands) - 1
    If $aCommands[$i][0] <> "" Then $aCommands[$i][1] = Run($aCommands[$i][0], @ScriptDir, @SW_MINIMIZE)
    Next
    Case $msg = $BeendenID
    MsgBox(0, "", "Prozesse werden beendet")
    For $i = 0 To UBound($aCommands) - 1
    If $aCommands[$i][1] > 0 Then ProcessClose($aCommands[$i][0])
    Next
    Case $msg = $GUI_EVENT_CLOSE
    ExitLoop
    EndSelect
    WEnd
    EndFunc ;==>_Main

    [/autoit]

    mfg autoBert

  • du musst den quellcode so abändern:

    Spoiler anzeigen
    [autoit]


    Global $aCommands[8][2]
    $aCommands[0][0] = '"C:\Program Files\Sandboxie\Start.exe " /box:DefaultBox "C:\Program Files (x86)\VMware\VMware Workstation\hqtray.exe"'
    $aCommands[1][0] = '"C:\Program Files\Sandboxie\Start.exe " /box:DefaultBox "C:\Program Files (x86)\VMware\VMware Workstation\vmnat.exe"'

    [/autoit]

    also überall hinten die[0] hin da dies ein 2D array ist