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

Scott Gustafson scott at rngcabinetshop.com
Mon Feb 27 14:00:01 GMT 2012


Strike the thought on nesting responses, I guess I just figured it out. A reply to the email I received, with a CC to vbox-dev, and it nests.

Scott Gustafson
R&G Construction Cabinet & Millwork
North Plainfield, NJ
908-755-9422


-----Original Message-----
From: Scott Gustafson [mailto:scott at rngcabinetshop.com] 
Sent: Monday, February 27, 2012 8:49 AM
To: Andreas Löffler
Cc: vbox-dev at virtualbox.org
Subject: Re: [vbox-dev] Access the Virtualbox API inside the guest?

Greetings, Andreas!
Thanks for the suggestion, the ",0" on the end of the shell.run line was it! I'd forgotten about that window-state number. ",7" seems to keep the VboxControl window from showing, and I only get a slight flicker on the taskbar. That's good enough for me.

(I have not figured out how to get my responses to nest like yours and the other developers. Sorry for the messy arrangement...)

Scott Gustafson
R&G Construction Cabinet & Millwork
North Plainfield, NJ
908-755-9422


-----Original Message-----
From: Andreas Löffler [mailto:andreas.loeffler at oracle.com] 
Sent: Monday, February 27, 2012 8:23 AM
To: Scott Gustafson
Cc: vbox-dev at virtualbox.org
Subject: Re: [vbox-dev] Access the Virtualbox API inside the guest?

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 
"src/VBox/Additions/common/VBoxControl".

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?

-Andreas



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


_______________________________________________
vbox-dev mailing list
vbox-dev at virtualbox.org
https://www.virtualbox.org/mailman/listinfo/vbox-dev




More information about the vbox-dev mailing list