CreateProcess runs in the wrong Windows guest session

Discussion about using the VirtualBox API, Tutorials, Samples.
Post Reply
rami
Posts: 14
Joined: 8. Jul 2012, 20:53

CreateProcess runs in the wrong Windows guest session

Post by rami »

Hi.

I'm running VirtualBox 7.0.6 r155176 on Windows 10 64-bit host.
I'm running VBoxWebSrv.exe and calling the XML web service API.

When I try to run a process in a Windows guest machine, the process is launched in the wrong Windows session.

It was working without issues in VirtualBox 6.1.42.

For example, when the following code is run:

Code: Select all

IGuest_createSession("Administrator", "password", null, null)
I noticed a new process is launched in Windows session 0:
C:\Windows\System32\VBoxService.exe guestsession --session-id=1 --session-proto=2 --user Administrator

Should I have expected it to have been launched in Windows session 1?

After waiting for the guest session to start, I call

Code: Select all

IGuestSession_processCreate
The process also gets launched in Windows session 0.

I did not pass Hidden to the flags in processCreate.

I expected the process to be launched on the desktop.
I'm logged in the guest as Administrator in Windows session 1.

Any ideas?

Thank you.
rami
Posts: 14
Joined: 8. Jul 2012, 20:53

Re: CreateProcess runs in the wrong Windows guest session

Post by rami »

I think this is the same bug being tracked here: https://www.virtualbox.org/ticket/21417
noteirak
Site Moderator
Posts: 5231
Joined: 13. Jan 2012, 11:14
Primary OS: Debian other
VBox Version: OSE Debian
Guest OSses: Debian, Win 2k8, Win 7
Contact:

Re: CreateProcess runs in the wrong Windows guest session

Post by noteirak »

Looks like a bug indeed, well done finding the ticket!
Hyperbox - Virtual Infrastructure Manager - https://apps.kamax.lu/hyperbox/
Manage your VirtualBox infrastructure the free way!
rami
Posts: 14
Joined: 8. Jul 2012, 20:53

Re: CreateProcess runs in the wrong Windows guest session

Post by rami »

From ​viewtopic.php?t=109351
We've identified and (hopefully) fixed the issue; the reason was that the service on the guest did not start guest processes in session >= 1 anymore.

The issue should be fixed with the latest 7.0 test build for the Guest Additions (build >= 161506), which can be found here:

https://www.virtualbox.org/download/tes ... 161506.iso

After the installation the guest needs to be rebooted.

Please let us know if this fixed the issue for you. Thanks!
rami
Posts: 14
Joined: 8. Jul 2012, 20:53

Re: CreateProcess runs in the wrong Windows guest session

Post by rami »

I verified the issue is resolved in VirtualBox 7.0.18 and VirtualBox 7.0.18 Guest Additions, using a Windows 10 Host and Windows 10 Guest.

I was expecting to see this mentioned in the change log, referencing https://www.virtualbox.org//ticket/21417.

Thank you.
Post Reply