Actions
- Start the virtual machine:
VBoxManage startvm "{VM NAME}" --type headless - Open the URL:
VBoxmanage guestcontrol "{VM NAME}" exec "{SHORT PATH TO THE BROWSER}" --username "{USER NAME}" --password "{PASSWORD}" "{URL TO OPEN}" .
Headless
The --type headless option is optional, if you want to see what happens, you can omit this.
Getting a short name
An easy way to get a shortcut to the browser is to open cmd.exe and run; cd "{NORMAL LONG PATH TO BROWSER}" , then command and a short path name will appear.
Params
- {VM NAME} == A name that depends on the name of the virtual machine.
- {USERNAME} == The username of the system on the guest system running on the virtual machine, not the display name.
- {PASSWORD} == Password for the specified account
- {URL TO OPEN} == eg: /fooobar.com / ...
- {SHORT PART TO BROWSER} == for example: C: \ DOCUME ~ 1 \ JAMIE ~ 1 \ LOCALS ~ 1 \ APPLIC ~ 1 \ GOOGLE \ CHROME \ APPLIC ~ 1 \ chrome.exe
Example
To open IE9 from a virtual machine accessible 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'
Credit
Thanks to http://www.quora.com/Chapley-Watson for this answer, I searched all over the place, including Stack Overflow, and received no answers. Hope this helps someone.
source share