MED-V V2: Strange Message – was closed with a user logged on.

Are your MED-V v2 users ever having this happen? When they go to start a MED-V published application in seamless mode or launch a virtual machine from the Virtual PC window, you get the following message:

<Virtual PC name> was closed with a user logged on

Click Continue to open the virtual application. This will log off the user from <Virtual PC name> and you will lose any unsaved data.

This is technically caused by a triggering of a RAIL (RemoteApp Installed Locally) application while a regular VPC RDP session is in use or vice-versa. The user scenarios can be mixed. In some cases the users are trying to log on when the Virtual PC still has the local administrator account logged on. This can happen if the Autoadminlogon count is set too high in the SYSPREP.INF file. The logon account should really never exceed 2 except in some rare scenarios. Another example you may see this is when you attempt to start MED-V or a MED-V published application after working with the Virtual PC in Full Desktop mode. There is really no Full Desktop mode technically in MED-V 2.0. When you are launching a VPC in Full Desktop mode you are doing that exclusively in Virtual PC and MED-V is not aware. A full desktop VPC connection is RDP-based (using a regular Windows shell) while a MED-V seamless application is using RAIL (which uses the RDPSHELL.) When you start the MED-V workspace/published application, it detects that a different session was already present in the virtual environment and it must log off that session before starting the MED-V RemoteApp session (as it uses the RDPSHELL instead of Explorer as the base shell) or vice versa if accessing the virtual machine from the Virtual PC console.

One way to prevent this if it is the local Administrator being logged on is to ensure that the AutoAdminLogonCount account is at 2 in the SYSPREP.INF file.

In addition, users will have to be educated that if they go back and forth between MED-V seamless integration and VPC Full Desktop, that they will need to log off on the Virtual PC full desktop mode before closing/hibernating the VPC. In addition, they will need to disable Fast Start on the MED-V v2 side.

In the first version of MED-V, we leveraged the Kidaro shell for Full Desktop and Seamless Integration. In v2, MED-V uses its own implementation of RemoteApps for Seamless integration and leaves full desktop access exclusively to the VPC engine (which itself uses RDP for integration components when running in Full Desktop mode.)

Here is an example of a scenario in which this may happen. If a user currently has the MED-V agent running and want to view the desktop in Full Screen mode, they would have to switch over to Virtual PC. Upon doing that, they will see the virtual machine for the workspace. Once they open up the Virtual machine in Virtual PC (for full desktop access) MED-V is no longer in the picture. Upon closing the Virtual PC in full desktop mode, it hibernates the virtual PC by default. At this point, when you try to launch an application under MED-V (back in seamless mode) this new user session that was saved upon VPC hibernation will prompt the user with message from Virtual PC. This will also work vice-versa.


Another way to tell if it is the high AUTOADMINLOGONCOUNT issue, connect to the virtual machine from the Virtual PC console.

Enter your credentials:

If it takes you to the desktop directly, then it is likely the switching back and forth between MED-V and Virtual PC that is causing the error. If you get a message regarding the logon of the local administrator account still being in use, then it is likely because your AutoAdminLogonCount setting in the SYSPREP.INF file is set too high.