views:

538

answers:

3

Windows application manifests have a very loose grammar — unrecognized parts are ignored. How can I diagnose which parts are recognized and which are not?

The problem leading to this question is with an application that has a side-by-side UAC manifest with a requestedExecutionLevel of highestAvailable specified. This should switch Vista file virtualization off, but it does not. I want to find out why. The manifest is being used, as I checked by intentionally introducing a syntactic error, but I see no way of determining how it is being used.

A: 

I would review through the documentation to ensure that it conforms to spec, but other than that there isn't an automated tool to do the same thing as far as I am aware.

lfaraone
Thanks. I read through the MSDN articles, as well as the "Windows Vista Developer Story" document. I guess, more than anything, it bothers me that there is this fairly important part of an application that is human-editable, but which seemingly cannot be debugged.
Don Reba
It is unfortunate, but the best you could hope for is a third-party syntax checker (which would have its own parsing bugs)
lfaraone
The specific issue was mentioned in the question, but it is besides the main point of interest. :)
Don Reba
mt.exe can validate the syntax of manifests. Unfortunately it does not validate the specific section of manifests relating to UAC, as it does not understand the asm.v3 namespace.
Eugene Talagrand
+2  A: 

I had the similar problem: the task manager showed Virtualization was enabled for the running apps despite the apps being manifested as highestAvailable. I tried using mt.exe to manifest my files. It worked on some but not on others. That strange behavior made me think there was some persistent cache in Vista that affected UAC info based on an exe's timestamp. The solution was to use the manifest wizard from Resource Tuner.

Wylder
Your assessment is correct. There are two caches.The first, based on the executable's timestamp, determines whether Windows should bother to check for the existence of a manifest (i.e. if you add a manifest, update the exe timestamp).The second is for the contents of the manifest, keyed off the timestamp of the manifest (which might be the same as for the exe if it's embedded)
Eugene Talagrand
+2  A: 

See my comment to Wylder - have you tried to update the timestamp of executable & manifest?
What does "sxstrace" run from an elevated command prompt return?
Could you post your manifest somewhere?

Eugene Talagrand
The sxstrace utility, the detail about mt.exe not knowing asm.v3, and the specifics of caching were new to me. The specific problem I can solve on my own. It is not urgent, in any case. Thanks.
Don Reba