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 , 9 years ago
comment:2 by , 9 years ago
Thank you very much for the hint, it works now. There seems to be a bug however, because --exe should be followed by path to executable, not .exe itself? Now I have to write shutdown.exe two times to get the desired result :(
comment:3 by , 8 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
I think that bug was fixed in 5.0.18. Please reopen if necessary.
Actually this works but take care that the first parameter after '--' is arg0 as passed to the application. In your case just use
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.