Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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"
"C:\Program Files\Oracle\VirtualBox\VBoxmanage.exe" guestcontrol "Windows XP" execute --image "C:\PROGRA~1\MICROS~2\OFFICE11\WINWORD.EXE" --username xpuser
share|improve this question
What happens when you run your bat file? – Shevek Oct 8 '12 at 12:14
up vote 2 down vote accepted

From your script, I assume that your Windows XP user has no password (you only include the username flag)

The command that VBoxManage sends is done using a Windows remote session and by default, blank passwords are not allowed.

Do this in your Windows XP VM:

  1. Start -> Run -> Regedit
  2. Browse to [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa]
  3. Change the value of LimitBlankPasswordUse to 0

Your script should now work as expected

Also, if your VM is closed in a saved state, you shouldn't need to include the TIMEOUT command as Vboxmanage.exe startvm should wait for the VM to load before exiting.

If you shut down the VM when finished with it then the TIMEOUT should probably stay.

share|improve this answer
@@Shevek, thanks for the quick response. Actually I've added winword.exe to the startup group in VM and works fine. However, I was trying to do this using a batch file so that I can create batch files for any program I want. I've edited my first post and included the batch file I'm trying to make it work. – Murat Arpat Oct 8 '12 at 12:09
@MuratArpat - I have edited, with a different answer, hopefully the solution – Shevek Oct 8 '12 at 12:28
@ Shevek - I got it worked with your regedit solution, only after adding TIMEOUT line again. I do not know why but guest OS desktop should be loaded otherwise the line after TIMEOUT line does not work, and value added with TIMEOUT is also important. For example, TIMEOUT 10 does not work while TIMEOUT 15 and above works. Thanks for the answer. – Murat Arpat Oct 9 '12 at 8:07
Ah, I think it may be because my VM was in a saved state so the launch was almost immediate. – Shevek Oct 9 '12 at 13:15
I've edited the answer – Shevek Oct 9 '12 at 13:17

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.