VirtualBox

Opened 9 years ago

Closed 8 years ago

#14506 closed defect (fixed)

guestcontrol run --exe: process arguments not working

Reported by: DaDaniel Owned by:
Component: guest control Version: VirtualBox 5.0.2
Keywords: Cc:
Guest type: other Host type: other

Description

in v4.x this command works: VBoxManage guestcontrol "vm" execute --image "C:\Windows\system32\shutdown.exe" --username Administrator --password 12345 --wait-exit -- "-s" "-f" "-t" "10"

in v5.x command "execute --image" and "--wait-exit" are unknown. New v5.x command does not pass arguments: VBoxManage guestcontrol "vm" run --exe "C:\Windows\system32\shutdown.exe" --username Administrator --password 12345 --wait-stdout -- "-s" "-f" "-t" "10"

Change History (3)

comment:1 by Frank Mehnert, 9 years ago

Actually this works but take care that the first parameter after '--' is arg0 as passed to the application. In your case just use

... -- shutdown.exe -s -f -t 10

You can also remove the --wait-stdout parameter.

In particular, the new command 'run' is for starting a guest application and waiting for this application to be finished, then stdout/stderr will be captured and written to the console. The other new command, 'start', is more similar to the previous 'execute' command. This command starts the process but returns immediate.

I admit that the documentation is incomplete but your above example should work.

comment:2 by DaDaniel, 9 years ago

Thank you very much for the hint, it works now. I didn't notice that --exe is followed by path to executable, not executable's name itself.

Version 1, edited 9 years ago by DaDaniel (previous) (next) (diff)

comment:3 by Frank Mehnert, 8 years ago

Resolution: fixed
Status: newclosed

I think that bug was fixed in 5.0.18. Please reopen if necessary.

Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use