Windows Vista default application

I am testing my desktop application on a machine running Windows 8, and I noticed that there is a new column called โ€œOperating system contextโ€ in the task manager information view. This shows my application running under the "Windows Vista" context.

I did not specify anything in the application manifest to force the application to run in this context in Visual Studio. The application is a Visual C ++ application and was created in Visual Studio 2010.

Don't get me wrong, the application runs smoothly on Windows 8, so I'm not looking for a solution to crashes or errors. It just annoys me that I see such a thing and want to fix it.

So my question is how to get the application to run in the context of Windows 8 under Windows 8?

+4
source share
1 answer

Ok, I think I found the answer here . It says:

Applications without the Compatibility section in their manifest will receive Windows Vista default behavior in Windows 7 and future versions of Windows

So, if there is nothing in your manifest, Vista is what you get. As you read the rest of this article, it seems like it's best to get Windows 7, not Windows 8, so maybe something special for Store Apps?

EDIT

Ok, I finally found the entry you need for Windows 8:

<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/> 

So try putting this in the compatibility section of your manifest.

I know that you are using VS2010, so this may be different, but with VS2012 I did the following:

  • New WPF application created
  • Right-click the project in Solution Explorer and select "Add New Item"
  • Select an application manifest from the list

A new manifest with comments on compatibility parameters has been added to the project. The cut-off example with everything without commenting 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 recovery, the application appears in the task manager, as expected:

enter image description here

+7
source

All Articles