[vbox-dev] Access the Virtualbox API inside the guest?

Andreas Löffler andreas.loeffler at oracle.com
Mon Feb 27 05:22:57 PST 2012

Hi Scott,

there's no COM API on the guest like there's on the host. However, you 
can take a look at VBoxControl and see how it's done -- its source is in 

For invoking VBoxControl with VBS, maybe something like

Set shell = CreateObject("WScript.Shell")
shell.Run "VBoxControl <parameters>", 0

(see http://msdn.microsoft.com/en-us/library/d5fk67ky%28v=vs.85%29.aspx)

will do to hide the command line window (the "0" at the end of .Run) if 
you don't want to write your own client?


On 27.02.2012 14:02, Scott Gustafson wrote:
> I have found VboxControl, and that’s how I get the heartbeat indicator
> now, using “VboxControl guestproperty set”. Even when I run this command
> from a vbs script (shell.run “VboxControl guestproperty set…”) it still
> pops up a command window for an instant, since VboxConrtol is a
> command-line program, not an API call.
> Is there a way to access the functions in the guest’s VboxControl directly in a VBS script, like the/CreateObject("VirtualBox.VirtualBox")/  does in the host?
> (PS, the user forum, where I first posted my question, is forever asking for lots of info: what are you trying to do, what’s you host OS, what’s your guest OS, how many guests, why are you trying to do this, etc. That’s why I wrote a more descriptive question than just“How do I access the API in the guest?”, so I would try to cover all the simple time-consuming questions in one shot.)
> Scott Gustafson
> R&G Construction Cabinet & Millwork
> North Plainfield, NJ
> 908-755-9422
> _______________________________________________
> vbox-dev mailing list
> vbox-dev at virtualbox.org
> https://www.virtualbox.org/mailman/listinfo/vbox-dev

Kind regards / Mit freundlichen Grüßen

Andreas Löffler | VirtualBox Engineering
Oracle Virtualization

ORACLE Deutschland B.V. & Co. KG
Werkstrasse 24
D-71384 Weinstadt, Germany

Hauptverwaltung: Riesstr. 25, D-80992 München
Registergericht: Amtsgericht München, HRA 95603
Geschäftsführer: Jürgen Kunz

Komplementärin: ORACLE Deutschland Verwaltung B.V.
Hertogswetering 163/167, 3543 AS Utrecht, Niederlande
Handelsregister der Handelskammer Midden-Niederlande, Nr. 30143697
Geschäftsführer: Alexander van der Ven, Astrid Kepper, Val Maher

More information about the vbox-dev mailing list