Three Modes of Windows XP Mode

Enhanced Mode and Basic Mode

Windows® XP Mode provides seamless integration of the VM (guest) with the Windows 7 host desktop, by means of Integration Components (ICs). ICs are a set of binaries which run inside the VM and communicate directly with the host OS. They enable Integration Features like clipboard sharing, printer sharing, file system and drive sharing, Start menu integration and file association with virtual apps. This allows the user to switch freely between the XP VM and Windows 7 desktops and applications. You can run Windows XP Mode as a full Windows XP desktop in two different ways: Enhanced Mode and Basic Mode. 

  1. Enhanced Mode is the default mode in which the Windows XP Mode VM starts. Majority of users will prefer this mode, as it is easy to use and provides the complete set of integration features described above. For example, saved credentials feature is provided in Enhanced Mode, so that users don’t have to login each time they launch Windows XP Mode, whereas this is not available in Basic Mode. Enhanced Mode is implemented using a connection channel based on the Microsoft® Remote Desktop Services RDP protocol. One of the options on the VM Toolbar under Tools is ‘Disable Integration Features’ (Figure 1). Clicking on this option switches the Windows XP VM to Basic Mode.
  2. Basic Mode provides basic integration features such as mouse and keyboard integration, USB support, time sync and heartbeat parity between the VM and the host. Integration features such as clipboard sharing, drive sharing and printer redirection are not available in this mode. This mode is useful for power users in software dev/test scenarios, where explicitly displaying the system level settings and BIOS messages as the VM boots up is important.   Apart from these differences, using the Windows XP desktop environment in Basic Mode is similar to using the Enhanced Mode.

image001

Figure 1. Using XP Mode VM Tool Bar to switch between Basic and Enhanced Modes

Virtual Applications: The ‘Invisible’ Third Mode

Virtual Applications Mode is the third mode – a completely seamless solution to application compatibility. This is the most likely and preferable way to launch and run your virtual applications, as they are seamlessly integrated with the Windows 7 desktop and Start menu. When an application is installed in the Windows XP Mode VM, a shortcut is automatically published to the Start menu of Windows 7, as explained in the previous blog. The key features of using virtual applications are:

  • Users can launch and run the legacy apps from Windows 7 Start menu and save the files created using virtual apps to their Windows 7 folders (My Documents, for example).
  • Files created using such applications have their file association enabled, which means that, clicking the file’s icon shortcut will also launch the required virtual application and open the file.
  • Virtual applications’ icons can be integrated with Windows 7 Super bar and the System Tray as well. In Figure 2, Microsoft Forefront™ Security running as a virtual application is shown in System Tray (within a brick red color outline on the Super bar).
  • Language bar support is provided for virtual applications. Users can launch a virtual app in their preferred language, and the Language bar would appear on the host desktop (Figure 2), enabling the user to start using the app in the chosen language. You can see the German language bar outlined in a brick red color rectangle in Figure 2, which enabled the use of Internet Explorer® German version as a virtual application.

image002

Figure 2. Language bar use and System tray integration of virtual applications

  • Virtual applications running in the VM have the ability to access the host folders such as My Documents.
  • Users can also configure the XP Mode VM to access only specified drives on the host.
  • A user can simultaneously use multiple virtual applications. They run in the same RemoteApp session started by the first one. As such, opening the second and subsequent applications is very fast.
  • Integration features are also available for virtual applications, enabled by the RDP protocol. USB devices can be attached and used from within a virtual application.
  • Users can also configure any virtual application to automatically start upon host start-up, by simply adding the virtual application’s published shortcut to the host’s start-up folder.  Microsoft Outlook® shown in Figure 3 would start automatically upon Windows 7 start-up.  Microsoft Excel® installed as a virtual application is shown in Figure 3 (among a number of virtual apps), as a short cut published under Windows XP Mode Applications.  Using this shortcut user can launch the virtual application.

image003

Figure 3. Adding a Virtual App (MS Outlook) to the Windows 7 Startup Folder

Engineering Overview:

Here is an overview of how Virtual Applications work, with a reference to the RemoteApp technology. Diagrams presented below are only a logical abstraction:

  • When a legacy application is installed in the VM, it gets added to a list of virtual applications (called the Allow list) whose shortcuts will be published to the Windows 7 Start menu. A Publisher object in the VM retrieves this list of applications from the VM’s Start menu (All user profile). This list changes only when new applications are installed or uninstalled in the VM.
  • The VM also maintains another list which should not be auto published (called the Exclude list). This is a static list.
  • Windows Remote Desktop Services RDP and RemoteApp technology is adapted to achieve seamless integration of virtual applications with Windows 7. Windows XP Mode VM functions as an RDP remote ‘server’, whereas the Windows 7 desktop serves as the RDP ‘client’ (Figure 4).
  • In case of Windows XP Mode, both the Windows XP Mode VM and the Windows 7 desktop co-exist on the same single machine, and are connected to communicate by a guest host communication channel based on RDP (Figure 4; Right). The VM itself is running in the background and is never visible to the user while using virtual applications.
  • Application’s GUI from the RemoteApp session is ‘remoted’ and presented to the Windows 7 desktop. Users see and use the virtual application in the same way as they would see a native Windows application. RemoteApp packages the graphics generated in response to user’s keystrokes and mouse clicks and sends them to the Windows 7 desktop where they are displayed.
  • Instead of using the RDP file to launch a remote application, user would be clicking on a virtual application of file icon/short cut to launch the virtual application (shown as Excel icon in Figure 4). Vmsal.exe, a WVPC component, mediates the launching of the virtual application. Since there is no actual network involved, this communication is fast and efficient.
  • When the user launches a virtual application, Vmsal.exe first starts the XP Mode VM and then establishes a connection to the VM and starts a RemoteApp session. RDP stack components are started in this session. An RDP virtual channel establishes a handshake between the host and the VM. Requests from the host to the VM, initiated via user’s mouse and keyboard inputs, are executed in the VM, similar to how they are executed in case of RemoteApp.
  • The RemoteApp logic checks against the allow list and launches the application in the VM.
  • Application in the VM creates a window. The window hook notifications are sent to the Windows 7 desktop. A plug-in creates the corresponding proxy window on Windows 7 desktop, and displays the application UI.
  • User’s input events are kept forwarded to the VM. When the user closes the virtual application window, the app exits in the VM. The VM is hibernated within 5 minutes after the last virtual application is closed, to conserve host resources. This time is configurable.

image004 image005

Figure 4. Architecture of XP Mode Virtual Applications (Right) compared to RemoteApp Architecture (Left)

In Closing…

There are three ways of using a Windows XP Mode VM. Virtual Apps and Enhanced Mode typically are preferred for business desktops. Windows XP Mode is prepared such that its configuration and setup are easy for the user and IT Admin. Joining the XP Mode VM to a network domain and using USB devices also is very easy. We will cover these aspects in the next article. Check out Windows XP Mode RC Build today, and let us know what you think, either via the comments section here, or sharing your feedback on the WVPC and Windows XP Mode Forum on Technet here.

Prasad Saripalli

Principal Program Manager

Microsoft Virtualization Team