Bug with VBoxManage guestcontrol from Guest Additions v7

Discussions about using Windows guests in VirtualBox.
fth0
Volunteer
Posts: 5678
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: VBoxManage guestcontrol works for calc.exe but not for WINWORD.EXE

Post by fth0 »

You're probably running into a known bug (#21774), that has already been fixed for the next release update. If you provide two virtual screens and the second one is turned off, both virtual screens get turned off. Either configure the VM to only provide one virtual screen, or turn on the second virtual screen from the VM window's menu.

After you've solved this issue, update the VirtualBox Guest Additions (in the guest) to 7.0.10.

The VBox.log file shows that you have the VirtualBox Extension Pack 7.0.10 installed now, so the current contents of /usr/lib/virtualbox/ExtensionPacks are probably no surprise now. ;)

Edit:
Added the link to the Bugtracker ticket.
Last edited by fth0 on 18. Aug 2023, 19:23, edited 1 time in total.
TVG
Posts: 34
Joined: 8. Aug 2022, 16:16

Re: VBoxManage guestcontrol works for calc.exe but not for WINWORD.EXE

Post by TVG »

Under Settings>Display, I changed Monitor Count from 2 to 1. Now it works fine. I was able to update the Guest Additions. I understand that I won't be able to use two screens for the VM until the next release. Correct? (No big deal for me).

I've tried again the VBoxManage guestcontrol command. There is no change. Calculator opens correctly but Microsoft Word goes to the "Background processes".
fth0
Volunteer
Posts: 5678
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: VBoxManage guestcontrol works for calc.exe but not for WINWORD.EXE

Post by fth0 »

TVG wrote: 11. Aug 2023, 13:55 I understand that I won't be able to use two screens for the VM until the next release. Correct?
I'm not so sure. What happened when you tried the other alternative I proposed? Please provide the (zipped) Windows_10_VM.vbox file afterwards.

Regarding the guest control, please try the following command variants (note the space after the last "--"):

Code: Select all

VBoxManage guestcontrol $MY_VM_NAME run --exe "C:\\Program Files\\Microsoft Office\\root\\Office16\\WINWORD.EXE" --arg0 "C:\\Program Files\\Microsoft Office\\root\\Office16\\WINWORD.EXE" --username $MY_USERNAME --password $MY_PASSWORD -- "C:\\Program Files\\Microsoft Office\\root\\Office16\\WINWORD.EXE"
VBoxManage guestcontrol $MY_VM_NAME run --exe "C:\\Program Files\\Microsoft Office\\root\\Office16\\WINWORD.EXE" --username $MY_USERNAME --password $MY_PASSWORD -- "C:\\Program Files\\Microsoft Office\\root\\Office16\\WINWORD.EXE"
TVG
Posts: 34
Joined: 8. Aug 2022, 16:16

Re: VBoxManage guestcontrol works for calc.exe but not for WINWORD.EXE

Post by TVG »

If I turn on the second virtual screen from the VM window's menu, then it works, instead of a black screen, I get two virtual screens with the VM. If I turn off the second virtual screen, the VM keeps working in the first virtual screen.

The two command variants you proposed have the same behavior than the one I'm using.
Attachments
VBox.zip
(39.74 KiB) Downloaded 70 times
fth0
Volunteer
Posts: 5678
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: VBoxManage guestcontrol works for calc.exe but not for WINWORD.EXE

Post by fth0 »

TVG wrote: 14. Aug 2023, 13:55 If I turn on the second virtual screen from the VM window's menu, then it works, instead of a black screen, I get two virtual screens with the VM. If I turn off the second virtual screen, the VM keeps working in the first virtual screen.
It probably only fails after you've shut down the VM while only the first virtual screen was turned on. But you don't need to try, because it has been fixed already for the next VirtualBox release update.
TVG wrote: 14. Aug 2023, 13:55 The two command variants you proposed have the same behavior than the one I'm using.
Ok, then I'm out of ideas for now.
TVG
Posts: 34
Joined: 8. Aug 2022, 16:16

Re: VBoxManage guestcontrol works for calc.exe but not for WINWORD.EXE

Post by TVG »

fth0 wrote:Ok, then I'm out of ideas for now.
Is there a way to report this problem?
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: VBoxManage guestcontrol works for calc.exe but not for WINWORD.EXE

Post by scottgus1 »

A Bugtracker ticket could help, with zipped logs and a link to this topic added.
TVG
Posts: 34
Joined: 8. Aug 2022, 16:16

Re: VBoxManage guestcontrol works for calc.exe but not for WINWORD.EXE

Post by TVG »

scottgus1 wrote: 10. Aug 2023, 17:49 One thought, could the "guestcontrol" process be attempting to redirect the output of the app to the host? I don't remember the guestcontrol switches...
I've create a HelloWorld script that I converted to an executable file. When I do

Code: Select all

toto@toto-pc:~$ VBoxManage guestcontrol $MY_VM_NAME run --exe "C:\\Users\\Toto\\Desktop\\runapp\\runHello.exe" --username $MY_USERNAME --password $MY_PASSWORD
Hello, World!
toto@toto-pc:~$
note that "Hello, World!" shows up in the Terminal of my host instead of the guest.
TVG
Posts: 34
Joined: 8. Aug 2022, 16:16

Re: VBoxManage guestcontrol works for calc.exe but not for WINWORD.EXE

Post by TVG »

I downgraded to Virtualbox 6.1.46 and it didn't work either. I'm surprised because it worked on my previous Virtualbox version. At that time, I was on Ubuntu 22.04. Now, I'm on Ubuntu 23.04. Could the problem be due to Ubuntu?

EDIT: I've tried on another PC with Ubuntu 22.04.3 LTS and VirtualBox 6.1.38. It works like a charm! Then, I've upgraded VirtualBox to version 7.0.10. It also works like a charm! Then, the problem seems to be linked to the new Ubuntu version.
TVG
Posts: 34
Joined: 8. Aug 2022, 16:16

Re: VBoxManage guestcontrol works for calc.exe but not for WINWORD.EXE

Post by TVG »

I have upgraded to Ubuntu 23.10. Unfortunately, that did not solved the issue.
TVG
Posts: 34
Joined: 8. Aug 2022, 16:16

Re: VBoxManage guestcontrol works for calc.exe but not for WINWORD.EXE

Post by TVG »

Unfortunately, the problem is still going on with VirtualBox v7.0.12.
TVG
Posts: 34
Joined: 8. Aug 2022, 16:16

Re: VBoxManage guestcontrol works for calc.exe but not for WINWORD.EXE

Post by TVG »

The problem is due to VirtualBox Guest Additions from version 7. More here: https://askubuntu.com/questions/1484798 ... 3-04-23-10.
Post Reply