Skip to content

Instantly share code, notes, and snippets.

@DownGoat
Created March 25, 2018 09:47
Show Gist options
  • Save DownGoat/30cb9fa4d7bbc93177c092699d902e33 to your computer and use it in GitHub Desktop.
Save DownGoat/30cb9fa4d7bbc93177c092699d902e33 to your computer and use it in GitHub Desktop.
pyvbox - virtualbox api. Start process/execute program in guest
import virtualbox
from virtualbox.library import ProcessCreateFlag
VM_NAME = 'w7-32bit-1'
vbox = virtualbox.VirtualBox()
vm = vbox.find_machine(VM_NAME)
session = vm.create_session()
gs = session.console.guest.create_session("kokoa", '')
"""
http://pythonhosted.org/pyvbox/virtualbox/library.html?highlight=process_create#virtualbox.library.IGuestSession.process_create
See for ProcessCreateFlags http://pythonhosted.org/pyvbox/virtualbox/library.html?highlight=process_create#virtualbox.library.ProcessCreateFlag
"""
gs.process_create("C:\\GUEST\\TARGET\\FILE.EXE", [], [], [ProcessCreateFlag(1)], 30)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment