Before you start
Objectives: learn what is shortcut, how to run application, what is installation, which subsystem is used to run applications, and about typical application compatibility issues in Windows.
Prerequisites: you should understand what is an operating system.
Key terms: bit, run, files, user, shortcut, directory, install, privileges, subsystem
Running an Application
We typically run an application by clicking on its shortcut from the Start Menu or some other location. Applications that we run appear in the Task Bar. Shortcuts are not the actual application files themselves. The shortcut is a pointer file that identifies the location of the executable file that runs the application. If we right click on a shortcut and edit its properties, the Shortcut tab shows us the location of the actual executable file. Installation typically creates shortcuts on the desktop and/or Start Menu. During install you can often choose to add shortcuts for only the current user or all users. The shortcut also identifies a directory that the application uses or references when it first starts. We can modify the directory by changing the ‘Start in’ property for the shortcut or executable.
Installation of Applications
Most applications are installed on our computer on the system drive in the Program Files directory. If we open that directory we’ll see folders for various applications or types of applications. 64 bit operating systems will have an additional folder called Program Files (x86). 64 bit applications are installed into the Programs Files directory and 32 bit applications are installed into the Program Files (x86) directory. These are the default locations when we install an application, however we can typically choose an alternate location for an application. Also, users have have the appropriate permissions to install the applications. The ability to install applications depends on the user’s group membership and the operating system. Users who are members of only the Users group are not able to install applications. On Windows 2000 and XP, users who are members of the Power Users group can only install applications that do not make modifications to system files.
On Windows Vista and up, Power Users cannot install applications. Users who are members of the Administrators group can install applications.
Application installation involves more than just copying the executable files to the computer. Installation typically modifies the registry, creates shortcuts, and configures other settings required by the application.
Subsystem
In Windows we have two modes of operations – Privileged mode and User mode. Note that applications reside in User mode. All applications run through the Win32 subsystem. 32-bit applications communicate directly to the Win32. Win32 subsystem isolates the threads of every application, so if our application crashes it will not affect any other application that is running. The Win32 subsystem has the ability of creating the environment for 16-bit applications as well. We call this environment the NT Virtual DOS Machine or NTBDM. Our 16-bit apps also expect a Windows environment, so on top of NTBDM the system will run Windows on Win32, or as it is often called, the WOW or Windows on Windows. Inside of the WOW we can run all our 16-bit applications, but the thing is, if one of our 16-bit apps crashes, it will also crash every other 16-bit app that is running in our WOW. In fact, WOW will crash. We can stop the NTVDM process to stop the virtual DOS machine and all programs running in it. Since NTBDM is a 32-bit application, all our other 32-bit applications will remain intact. If we have a problematic 16-bit application that often crashes, it is possible to open it in a separate NTBDM. In that case, it will get it’s own WOW and it will run in an isolated environment. If it crashes, it will not affect other 16-bit applications since it runs in a separate memory space.
A 64-bit operating system can run both 32-bit and 64-bit applications, but a 32-bit application can only run 32-bit applications. Similarly, 16-bit operating system can’t run 32-bit applications.
Application Compatibility
If we want to run some legacy applications that are not compatible with our current version of Windows, we can try and use the Compatibility mode. Compatibility mode applies a predefined set of modifications that changes the operating system’s behavior to more closely emulate a previous version of Windows. When the application runs, it appears as if the application is running on the target operating system. To modify that we can go to the properties of the application shortcut and go to the Compatibility tab to edit settings. Here we will be able to select the target operating system for which the application was designed.
Compatibility Tab in Windows 7
Those are predefined compatibility modes that we can choose. With those modes we can simulate our environment for the application that we want to run. For example, if we have an application that works in Windows XP, but it doesn’t work on our current Windows 7 installation, we would choose Windows XP SP3 or SP2 in this case. In addition to choosing compatibility modes, we can also change settings such as color depth and screen resolution, which might be causing problems with the application running. For example, we can run our application in 256 color. This will enable us to run applications which are designed with limited colors to display correctly. This includes very old or even DOS applications. For applications that were designed to run in low resolution we will choose the “Run in 640×480 resolution” option. Other options that we can check are:
- Disable Visual Themes (visual themes can sometimes cause display problems)
- Disable Desktop Composition (this disables Aero user interface and transparency)
- Disable Display Scaling (this disables automatic resizing of applications)
We can also specify that the application always runs with administrative privileges. Some older applications actually require administrative privileges in order to run, but are not able to prompt for evelation. All those settings can be saved for single user or for all users on the computer. Even though these compatibility modes are designed to replicate the environment of the previous operating systems, the application that worked on previous operating system might not work on the same compatibility mode on newer operating system.
In Windows 7 we can also use the Program Compatibility Troubleshooter utility, which will perform certain tests on the application and try to determine which settings are required in order to run on Windows 7. This utility only works with executable files. To run this utility, we can simply right-click our application and choose the ‘Troubleshoot Compatibility’ option. The Program Compatibility Troubleshooter will save new settings in the system, so that the application can function without problems.
Applications that consume excessive resources can be assigned a lower priority level. We can assign resources for applications and their processes using Task Manager. Levels from highest to lowest are: real-time, high, above normal, normal, below normal and low.
Some applications require that the user has elevated privileges. On Windows 2000, all users could typically run all applications. On Windows XP and newer operating systems that might not be the case. To solve this problem in Windows XP, we can right-click the application shortcut or executable file and choose ‘Run as’, or we can make a particular user member of user group which has administrative privileges. In Windows Vista and up, even if we log on with a user with administrative privileges we’ll often see the message about elevated privileges requirement. This is because our user account runs as a limited user until elevation is required. In that case we can right click the application and chose Run as Administrator option. Then we will get a warning in which we must give our consent to run the application with elevated privileges. Also, instead of if we need to use some application with elevated privileges often, we can open the properties for the application shortcut, click the Advanced button and choose the option to ‘Run as administrator’. Many applications as they run create data files, and might also require creating temporary files. The user must have sufficient permissions to the directories where the data and temporary files are created.
To manage compatibility we can also download the Application Compatibility Toolkit (ACT) from Microsoft website. This is a set of tools intended for administrators. With ACT we can determine existing applications in our environment and then manage their compatibility issues. With ACT we can create new or use existing compatibility fixes (shims). Shims are pieces of software which allow some other application to run in Windows. Multiple shims together create a compatibility mode for an application.
In Windows 7 we can also use the Windows XP Mode. This is a free downloadable compatibility option which can be used on Windows 7 Professional, Ultimate and Enterprise editions. By using Windows XP Mode we actually run our applications on a virtualized XP machine. The difference between Windows XP Mode and other virtualization technologies is that all applications that we install in the Windows XP Mode virtual machine will be available to the Windows 7 host computer. That means that the icons for applications installed on Windows XP Mode machine will be available on our regular Windows 7 installation. When we run such application, it will run in its own window and it will seem as if it is running in Windows 7, but in fact it is running within a virtual machine. To run Windows XP Mode we have to have a CPU that supports hardware virtualization (AMD-V or Intel-VT options). Also, we should have at least 2 GB of RAM. Windows XP Mode actually runs 32-bit Windows XP Professional edition with SP3 installed. We can’t use Windows XP Mode for 64-bit applications. The bad thing about Windows XP Mode is that applications will run slower since we need to run the whole virtual machine. Windows XP Mode is the real Windows installation so administrators have to keep that in mind, and have to administer those machines as well. To use Windows XP Mode we first have to download and install Windows Virtual PC, and then download and install Windows XP Mode. After that we can install necessary applications within the Windows XP Mode environment.
Example Configuration
Check our our article to see how to deal with application compatibility issues in Windows 7.
Remember
Shortcuts are not the actual application files themselves. On 64-bit Windows system, 64-bit applications are installed into the Programs Files directory and 32 bit applications are installed into the Program Files (x86) directory. A 64-bit operating system can run both 32-bit and 64-bit applications, but a 32-bit application can only run 32-bit applications. Win32 subsystem isolates the threads of every application, so if our application crashes it will not affect any other application that is running. 16-bit applications can run using NT Virtual DOS Machine and Windows on Windows. Some legacy applications will run if we use the compatibility mode. Some applications require that the user has elevated privileges.