From Terminal in Mac OS X, I want to use VBoxManage guestcontrol to control Windows XP in a VirtualBox Virtual Machine, to open a URL in Internet Explorer.
VBoxManage startvm "{VM NAME}" --type headless
VBoxmanage guestcontrol "{VM NAME}" exec "{SHORT PATH TO THE BROWSER}" --username "{USER NAME}" --password "{PASSWORD}" "{URL TO OPEN}"
.The --type headless
option is optional, if you want to see what's happening you can omit this.
An easy way to get the short path to the browser is to open cmd.exe and run;
cd "{NORMAL LONG PATH TO BROWSER}"
then command
and the short path name will be displayed.
To open IE9 from the VM available from https://github.com/xdissent/ievms
VBoxmanage guestcontrol 'IE9 - Win7' exec 'C:\Progra~1\Intern~1\iexplore.exe' --username 'IEUser' --password 'Passw0rd!' 'http://google.com'
Thanks to http://www.quora.com/Chapley-Watson for this answer, I'd searched all over the place including Stack Overflow and got no replies. Hopefully this will help someone.
With new version they have changed some commands. The process will be as follows:
VBoxManage startvm "{VM NAME}" --type headless
(no changes)VBoxmanage guestcontrol "{VM NAME}" start --exe "{SHORT PATH TO THE BROWSER}" --username "{USER NAME}" --password "{PASSWORD}" -- iexplore "{URL TO OPEN}"
. (new commands)To open IE9 from the VM available from https://github.com/xdissent/ievms
VBoxmanage guestcontrol 'IE9 - Win7' start --exe 'C:\Progra~1\Intern~1\iexplore.exe' --username 'IEUser' --password 'Passw0rd!' -- iexplore 'http://www.wikipedia.org'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With