Tuesday, February 9, 2010

Problems use runProgramInGuest in Windows 2008

I meet a problem when use runProgramInGuest method of vmrun to run Acceptance Tests for my product in Windows 2008 os on the ESXi 4.0.0 server. The problem is that I can't see any active window in the windows 2008 console and as a result it is hard to develop and support user interface acceptance tests. It happens because of a program invoked by RunProgramInGuest is running under session 0 that is non-interactive. It is made in order to better protect the system against security risks. But what if a session 0 service needs to interact with the user? For example : a backup program wants to inform the user that it cannot start an automated backup because the external USB hard drive is disconnected. For this purpose there is the Interactive Services Detection Services (UI0Detect). It can be invoked by the service that needs to interact with the user. UI0Detect in turn presents to the user a window telling him that a particular service needs some interaction. The user gets two choices : "Show me the message", or "Remind me in a few minutes".



Clicking "Show me the message" switches the display to the service which wanted to interact with the user. By default, the startup mode of this service is Manual. Just use command below in cmd to change this mode.

sc config UI0Detect start= auto

So this very gracefully solves my problem and I'm happy - my product will be tested in windows 2008.

No comments:

Post a Comment