using remoteinstall with virtual machines with Windows Vista and newer

Jul 28, 2010 at 8:17 AM


I try to automate some test in our company and I chose RemoteInstall to work with. Everything runs fine on Windows XP 32&64 and 2003 32&64. On newer Windows (Vista, 2008, 7) when I try to run exe via RemoteInstall it is launched in system session (I guess) and "interactive service dialog detection" window appears (usually only for a moment). If I manage to press "Show me messages" button everything runs as it should otherwise nothing is happening and RemoteInstaller waits for test execution or it appears that test is performing but test results are wrong.

I tried to run test through miniRunAs ( runs miniRunAs with parameters that allows to run tests itself) but it helps with nothing. 

Do you know how to avioid this problem? Have any of you had the same problem? I would be greatful for any help.

Best regards,

Peter Renner


Jul 28, 2010 at 11:25 AM

We've been running tests on 2K8 without issues, but haven't been trying Vista or 7 at all. It would seem that the problem is that RI would needs to be making an interactive logon to the guest operating system. That would be an easy option to add (11677), but then, there's this thread that confused me a bit.

What kind of application are you trying to test?

Jul 28, 2010 at 1:11 PM

In this case we test disk defragmenter. First we copy application itself to machine, then execute GUI test written in AutoIT. Scripts return xml file that later are processed by our software that presents all results in one place. Other tests test effectivity of defragmentation. We have prepared disks, we run tests on them and receive results in .csv file. Everything runs great if "Show me messages" button is clicked... 

Adding option to logon interactively would be great :) We're looking forward to it. We use standard .vmx VMs if that information matters...

Jul 28, 2010 at 5:07 PM

Try build 1.3.3592.0. I added loginType to snapshots and snapshot. Try with loginType="interactive". Console output should say that it's doing an interactive logon, not jist a logon. Let me know if it works.

Jul 29, 2010 at 8:01 AM

Console output says that it's logging on interactively but it didn't help... Still "Interactive service dialog detection" appears and it must be clicked to let test perform successfully.

Jul 29, 2010 at 11:52 AM

Ok. It takes some time to pull the information out of my head's backup tape :) We had a thread that talks about this problem in VMWareTasks (the library I wrote that RI uses) and explains that you're hitting session 0 isolation. So far so good (or not so good :). It says you might need to pass an ACTIVATE_WINDOW flag to the task being executed, I think it's not necessary because you're already seeing the session 0 detection popup, but I'll add that to RI shortly in case it matters.

It looks like the solution may be here - you can switch to session 0 with rundll32 winsta.dll,WinStationSwitchToServicesSession and back with rundll32 winsta.dll,WinStationRevertFromServicesSession. Try switching to session 0 before your test.




Jul 29, 2010 at 3:01 PM
Edited Jul 29, 2010 at 3:02 PM

rundll32 winsta.dll,WinStationSwitchToServicesSession works fine but it must be executed after first attemtps to run tests. I temporarily put batch which executes this command couple of times before test is finally executed. We will must add function moving mouse every minute because if the mouse/keyboard are not moved for 1 minutes the machine locks and the user has to login and switch to session 0 again (

We will have to make this whole process more elegant but for now we must use what we have :) thank you very much for your help. Please let me know if you add some functionality to RI. I also noticed that if you choose loginType"normal" operiations timeout.
I didn't spend much time with this problem so it may be false alarm.


Jul 30, 2010 at 9:29 PM

I've added activatewindow to command tasks, in case that matters. Also note that loginType was renamed to logintype (lowercase to be consistent).

If you have a repro or something more solid on logintype="normal", please file a bug.

I'd really appreciate some kind of document (maybe in the RI documentation) on testing on Windows 7/2008. Many people run into these issues. And of course, if you can think of any feature that makes your life better around this or other problem, try to formulate it as a feature request here.