Problems use runProgramInGuest in Windows 2008 64bit

Sep 23, 2009 at 1:15 PM

I meet a problem when use runProgramInGuest method to run program in Windows 2008 64bit os. I use VMWareTasks1.2, Vix 1.62, Esx server 3.5 and the vm is windows 2008 64 bit os. The problem is when I run the program like "cmd.exe" or "msiexec.exe" , I can't see any active window in the windows 2008 console, I could only find the process "cmd.exe *32" or "msiexec *32" in task manager. Also I have also use the vmrun -activeWindow | -interactive, still I can't find the active window. Since my program is doing some ui task, if I can't see the active window, I could do nothing. Any idea for this, thank you.   

Sep 23, 2009 at 1:41 PM
Edited Sep 24, 2009 at 2:16 AM

I search from the vm community got follow answer:

1) You need to interact with the applications you are running
2) The application needs to be visible (this is basically the same as (1), but I want to make it clear that without VIX_LOGIN_IN_GUEST_REQUIRE_INTERACTIVE_ENVIRONMENT on Vista or later, the program will not appear anywhere on the desktop when it is running).
3) Your application needs access to named mapped network drives (as in, you mapped \\server\fileshare to V: and you program tries to access a file under V:)

so here, I guess fist I need use follow setting, so what options value here should I input for "Options_Interactive_env"?

virtualMachine.LoginInGuest(VMUser, VMPass,Options_Interactive_Env,20);
virtualMachine.RunProgramInGuest(Command, CommandArg,Options_Interactive_Env, 20);
              

Sep 24, 2009 at 2:15 AM

I have tried using follow setting, still it appear in the task manager and I can't find the program appear on the windows 2008 desktop.

virtualMachine.LoginInGuest(VMUser, VMPass,VixCOM.Constants.VIX_LOGIN_IN_GUEST_REQUIRE_INTERACTIVE_ENVIRONMENT,50);
virtualMachine.RunProgramInGuest(Command, CommandArg,VixCOM.Constants.VIX_RUNPROGRAM_ACTIVATE_WINDOW, 50);

Coordinator
Sep 24, 2009 at 12:59 PM

I think you're hitting session 0 isolation. The constants seem correct correct, but the right forum to answer this is really the VixCOM forum. Someone from VMWare should explain what variables to pass and if this can work at all.

Sep 25, 2009 at 2:06 AM

Thank you, seems this need VMWare to make 2008 run program in guest.

Sep 28, 2009 at 3:43 AM

Update the result of this discuss. The program invoke by RunProgramInGuest could work in windows 2008 64 bit. The code is as below.

virtualMachine.LoginInGuest(VMUser, VMPass,VixCOM.Constants.VIX_LOGIN_IN_GUEST_REQUIRE_INTERACTIVE_ENVIRONMENT,50);
virtualMachine.RunProgramInGuest(Command, CommandArg,VixCOM.Constants.VIX_RUNPROGRAM_ACTIVATE_WINDOW, 50);

And program invoke by RunProgramInGuest is running under session 0, use command below in cmd could see the program running in session 0.

sc config UI0Detect start= auto
net start UI0Detect