I am testing my desktop application on a Windows 8 machine and I noticed there is a new column in the Task Manager details view called "Operating system context". This shows my application running under the "Windows Vista" context.
I haven't specified anything in the application manifest to force the application to run under this context in Visual Studio. The application is a Visual C++ App and was built in Visual Studio 2010.
Don't get me wrong, the application runs smoothly on Windows 8 so I am not looking to solve crashes or bugs. It just annoys me to see such a thing and would like to fix it.
So my question is how can I make my application run under the "Windows 8" context under Windows 8?
Ok, I think I've found the answer here. It says:
Applications without a Compatibility section in their manifest will receive Windows Vista behavior by default on Windows 7 and future Windows versions
So if you don't have anything in your manifest, Vista is what you get. Reading the rest of the article, it seems the best you can do is get Windows 7 rather than Windows 8, so maybe that's something specific to Store Apps?
EDIT
Ok, I finally found the entry you need for Windows 8:
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
So try putting that in the compatibility section of your manifest.
I know you're using VS2010, so this may be different, but with VS2012, I did the following:
A new manifest is added to the project with compatibility settings commented out. A cut-down example with everything uncommented is as follows:
<?xml version="1.0" encoding="utf-8"?>
<asmv1:assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<!-- A list of all Windows versions that this application is designed to work with.
Windows will automatically select the most compatible environment.-->
<!-- If your application is designed to work with Windows Vista, uncomment the following supportedOS node-->
<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"></supportedOS>
<!-- If your application is designed to work with Windows 7, uncomment the following supportedOS node-->
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
<!-- If your application is designed to work with Windows 8, uncomment the following supportedOS node-->
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"></supportedOS>
</application>
</compatibility>
</asmv1:assembly>
After rebuilding, the application shows as expected in Task Manager:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With