VMware {code} Community
Vyacheslav86
Contributor
Contributor

How can I run program with GUI in guest Vista?

I have GUI based program, I testing.

But the program is loading inside UI session 0.

The question

How can I run program with GUI in guest Vista?

Environment

Host OS: Windows Vista Business 32bit, all updates

Vmware Workstation 6.5.1 build 126130

Guest OS: Windows Vista Business 32bit, all updates

Vmware Tools 7.8.4 build 126130

0 Kudos
8 Replies
admin
Immortal
Immortal

You'll need to pass the VIX_LOGIN_IN_GUEST_REQUIRE_INTERACTIVE_ENVIRONMENT flag in the 'options' parameter to VixVM_LoginInGuest(). When you use this, you will have to log in through VixVM_LoginInGuest() using the same user account as the user who is logged in the actual graphical session in the Vista guest.

Also, this currently doesn't work with domain user accounts, so you will have to use a local account.

0 Kudos
dalexeenko
Contributor
Contributor

Have you guys fixed this issue described here: http://communities.vmware.com/message/834041#834041? Are you using LogonUser, ImpersonateLoggedOnUser, AdjustTokenPrivileges, CreateProcessAsUser to run processes within interactive session on guest machine?

0 Kudos
admin
Immortal
Immortal

Interactive session passes the command to a process running within the user's session, as the user. It makes sure that credentials provided match that of the user in the session. There is no impersonation in this case.

0 Kudos
dalexeenko
Contributor
Contributor

But you have to explicitly pass winsta0\default as a desktop to CreateProcessAsUser() since you are creating a process from one running in non-interactive session (which has 0 id), right?

0 Kudos
admin
Immortal
Immortal

No, it's running in the user's session. It gets started when a user logs in.

0 Kudos
dalexeenko
Contributor
Contributor

No, I mean internally. From VMWare perspective. It seems to me that VIX handler (or whoever does all the calls) essentially is a Windows service which is running in non-interactive session as all Windows services do (and we are talking about Guest OS here). Then to create a process within an interactive session you have to login as a user (as usually Windows services are running within System account) and to specify an interactive desktop (which is winsta0\default by default). Correct me if I am wrong.

0 Kudos
admin
Immortal
Immortal

INTERACTIVE_SESSION does not use a Windows service.

0 Kudos
dalexeenko
Contributor
Contributor

Thanks for the clarification.

>Also, this currently doesn't work with domain user accounts, so you will have to use a local account.

Is there any way to make it work with domain user accounts? Do you have any plans to add an ability to login with VIX_LOGIN_IN_GUEST_REQUIRE_INTERACTIVE_ENVIRONMENT for domain users?

Thank you.

0 Kudos