VirtualBox

Ticket #8501 (reopened defect)

Opened 3 years ago

Last modified 2 years ago

VBoxManage guestcontrol execute passes program arguments incorrectly

Reported by: odyniec Owned by:
Priority: major Component: guest control
Version: VirtualBox 4.0.4 Keywords:
Cc: Guest type: other
Host type: other

Description

I've been using VBoxManage to start Internet Explorer on a guest Windows XP and pass an argument (the website URL), e.g.:

VBoxManage guestcontrol execute "VM Name" "C:\Program Files\Internet Explorer\iexplore.exe" --username "xxx" --password "xxx" --arguments "http://google.com/"

After a recent VB update, it stopped working -- the argument was no longer passed to IE. I found this issue reported here: #8010, and it's said to have been fixed in Guest Additions 4.0.2, but it appears it's still broken. With Guest Additions updated to 4.0.4, when I use the above command, Internet Explorer starts with the URL: http://files/Internet%20Explorer/iexplore.exe%20http://google.com/.

So it appears that everything following the first space character in the program path ("C:\Program Files\Internet Explorer\iexplore.exe") is passed as program arguments.

This has also been reported by another user in the forums:  http://forums.virtualbox.org/viewtopic.php?f=2&t=39628&start=0

Change History

comment:1 Changed 3 years ago by frank

  • Status changed from new to closed
  • Resolution set to fixed

Please try again with VBox 4.0.6.

comment:2 Changed 3 years ago by odyniec

  • Status changed from closed to reopened
  • Resolution fixed deleted

The problem is still there with both VirtualBox and Guest Additions updated to version 4.0.6. I checked with Windows XP and Windows 7 as guests, both have the problem.

comment:3 Changed 3 years ago by frank

What's your host?

comment:4 Changed 3 years ago by odyniec

My host system is Ubuntu.

comment:5 Changed 3 years ago by glindauer

I have the exact same problem with version 4.0.6r71344. My host is Mac OS-X (snow leopard) and the guest is Windows XP. Prior to the upgrade, the command

VBoxManage guestcontrol execute "Windows" "C:\Program Files\Internet Explorer\iexplore.exe" --username USERNAME

started internet explorer and navigated to the home web page. Now, it navigates to the page  http://files/Internet%20Explorer/iexplore.exe. It seems to see the space before "Files" as a parameter separator.

comment:6 Changed 3 years ago by glindauer

Hmmm... the command

VBoxManage guestcontrol execute "Windows" "cmd.exe" --arguments "/c \"C:\Program Files\Internet Explorer\iexplore.exe\"" --username USERNAME

successfully starts internet explorer and navigates to the home page. The command

VBoxManage guestcontrol execute "Windows" "cmd.exe" --arguments "/c \"C:\Program Files\Internet Explorer\iexplore.exe\"" --arguments "http://www.google.com" --username USERNAME

navigates to google upon starting.

comment:7 Changed 3 years ago by frank

  • Component changed from guest additions to guest control

comment:8 Changed 2 years ago by IgorMinar

This still affects 4.1.6

As a workaround I have to start my programs as:

VBoxManage guestcontrol "Windows XP (IE8)" execute --image "cmd.exe" --username MYUSER --password MYPASS --wait-exit -- "/c" "http://google.com/"

but this is quite convoluted and far from ideal.

comment:9 Changed 2 years ago by IgorMinar

oops.. typo.. it the command it even more complicated:

VBoxManage guestcontrol "Windows XP (IE8)" execute --image "cmd.exe" --username MYUSER --password MYPASS --wait-exit -- "/c" "C:\Program Files\Internet Explorer\iexplore.exe" "http://google.com/"
Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use