Windows Client TechCenter >
Windows 7 IT Pro Forums
>
Windows 7 Application Compatibility
>
Question about XP compatibility mode
Question about XP compatibility mode
- Hello there.
I'm looking for a more technical answer on something here: when you set an application to run in "Windows XP (SP3)" compatibility mode (by right-clicking on the executable -> properties -> compatibility) what exactly is happening in the OS ? I mean from the application point of view, what does the application see different between running in native Windows 7 mode and in XP compatibility mode ? What exactly does the OS "sets up" for the application when you choose to run it in XP compatibility mode ?
I bumped into this question when reading about the new desktop virtualization technology in Windows 7 (which lets you have a XP virtual machine running) because I fail to see the difference between using this new technology to run an application in XP mode AND using the "old" XP compatibility feature that I mentioned in my above paragraph to run the same application.
Can anyone enlight me about this or point me to some technical documentation explaining this?
Thanks a lot in advance!
Answers
- Hi Sueisfine,
Having used virtual machines for 8 years now, I can tell you a bit about the distinction. When you are running in XP VM mode, you are literally running your application in Windows XP - it is just the hardware that is "faked". Accordingly, there are no new limits applied by the operating system on any application - your application is absolutely not running on the new OS - it *is* running on Windows XP, but *displayed* inside your new OS.
However, if you are running in "XP Compatibility" mode, you are simply asking the new OS to tell the application (in response to its conventional "what OS am I running on?" questions) that it is running on Windows XP. However, the underlying operating system is still the new OS - it is *not* Windows XP.
Accordingly, where the new OS (I am being deliberately non-specific, as this answer applies to any operating system that offers "compatibility mode") applies new limitations on access to things (such as security on access to certain directories or resources), these new OS limitations will still apply to the "Windows XP" application. This mode is most useful for applications that are capable of running on the new OS but that have been written by someone taking a cautionary approach - "I don't know that this will work on future OS versions, so I will prevent the application running if I do not understand what is the OS". Generally, this mode will also do some nice things, like mapping requests to access "Documents and Settings" to "Users" (Windows 7 actually has this built-in for all applications).
However, there are things that change between operating systems that are not so easy to fake without breaking things - particularly with respect to security enhancements. You certainly do not want an application to be able to run as an administrator without any warnings simply because it has been marked as "run in Windows XP compatibility mode".
Accordingly, if your application is broken by security or interface changes, compatibility mode may not help while running on a VM certainly will.
I hope this helps.
Paul Adams
Senior Software Engineer
Romteck Pty Ltd- Edited bypauladams777 Thursday, May 14, 2009 3:35 PM
- Marked As Answer bySueisfine Thursday, May 14, 2009 4:12 PM
- Edited bypauladams777 Thursday, May 14, 2009 3:33 PM
All Replies
In the "old" XP compatibility mode the current OS (Windows 7) uses tries to trick the application into believing the OS (Windows 7) is some other OS (XP or Vista) by a variery of methods. The OS is always Windows 7, it's just that in the applications memory space it's reporting and behaving (to the extent possible) as the selected previous OS would. In many cases this is enough to make an app work.
In the new XP mode the application is acutally running in a funtional version of XP in a VM. You just aren't shown the full XP deskop environment - only the running app. Once the app exits the VM is closed.- First of all thanks for your answer!
Hmmm, let me see if I understood correctly: you're saying that in the "old-style" XP compat mode an application gets his own temporary "private XP environment" to run in, like it was running on XP itself. So... what's the difference between running an app like this or running in the XP Mode VM?
I mean, can you give me a reason/example why I would run an app in the VM instead of the "old-style" XP compat mode? Can you show me a specific case where it wouldn't work in the XP compat mode and would only work in the XP Mode VM ?
Aren't both techniques producing the same thing (running an app as XP inside Windows 7) ?
Thanks again in advance and i'm sorry for pressing on this issue but I really would like to clearly understand how this works once and for all :) - Hi Sueisfine,
Having used virtual machines for 8 years now, I can tell you a bit about the distinction. When you are running in XP VM mode, you are literally running your application in Windows XP - it is just the hardware that is "faked". Accordingly, there are no new limits applied by the operating system on any application - your application is absolutely not running on the new OS - it *is* running on Windows XP, but *displayed* inside your new OS.
However, if you are running in "XP Compatibility" mode, you are simply asking the new OS to tell the application (in response to its conventional "what OS am I running on?" questions) that it is running on Windows XP. However, the underlying operating system is still the new OS - it is *not* Windows XP.
Accordingly, where the new OS (I am being deliberately non-specific, as this answer applies to any operating system that offers "compatibility mode") applies new limitations on access to things (such as security on access to certain directories or resources), these new OS limitations will still apply to the "Windows XP" application. This mode is most useful for applications that are capable of running on the new OS but that have been written by someone taking a cautionary approach - "I don't know that this will work on future OS versions, so I will prevent the application running if I do not understand what is the OS". Generally, this mode will also do some nice things, like mapping requests to access "Documents and Settings" to "Users" (Windows 7 actually has this built-in for all applications).
However, there are things that change between operating systems that are not so easy to fake without breaking things - particularly with respect to security enhancements. You certainly do not want an application to be able to run as an administrator without any warnings simply because it has been marked as "run in Windows XP compatibility mode".
Accordingly, if your application is broken by security or interface changes, compatibility mode may not help while running on a VM certainly will.
I hope this helps.
Paul Adams
Senior Software Engineer
Romteck Pty Ltd- Edited bypauladams777 Thursday, May 14, 2009 3:35 PM
- Marked As Answer bySueisfine Thursday, May 14, 2009 4:12 PM
- Edited bypauladams777 Thursday, May 14, 2009 3:33 PM
- A clear and enlightening answer pauladams777, thank you so much for taking the time to write it :)
Thanks also Kevin64A for your previous post.
Cheers!
