How to start VirtualBox using commandline?

Posted by Murat Arpat on Super User See other posts from Super User or by Murat Arpat
Published on 2012-10-08T11:42:31Z Indexed on 2012/10/11 9:41 UTC
Read the original article Hit count: 252

I've VirtualBox on a Windows 7 PC and created a virtual machine for Windows XP. Here is what I want to do:

  1. Run VirtualBox
  2. Power on guest OS (named "Windows XP")
  3. Open Winword in guest OS

I want to accomplish these 3 steps at once (by using a batch file for example).

Any help would be appreciated.

In fact I've a batch file but it does not work as I wanted:

"C:\Program Files\Oracle\VirtualBox\Vboxmanage.exe" startvm "Windows XP"
TIMEOUT 30
"C:\Program Files\Oracle\VirtualBox\VBoxmanage.exe" guestcontrol "Windows XP" execute --image "C:\PROGRA~1\MICROS~2\OFFICE11\WINWORD.EXE" --username xpuser

© Super User or respective owner

Related posts about windows-7

Related posts about command-line