UKC

Any VC++ developers out there ? Know anything about manifests ?

New Topic
This topic has been archived, and won't accept reply postings.
 Chris the Tall 28 Nov 2013
Anyone using Microsoft Visual C++ ?
Do you know anything about manifest files ?
Specifically, can you tell me how to include a compatibility section in the manifest that gets embedded in my executable.

It would appear that when my prog gets downloaded from the web, Windows 7 takes a dislike to it and Program Compatibility assistant puts out a warning that it may not have installed correctly.

Googling that error has led to me to stuff on the manifest, but as ever the Microsoft help is as much use as a chocolate tea pot. And as ever this problem comes to light right at the end of a development cycle, just when we are about to release.
 ByEek 28 Nov 2013
In reply to Chris the Tall:

Which version of Visual Studio? I have only used Manifest files for UAC settings.

If you are using 2012+ you can add useful stuff like UAC control by right-clicking on your project and select Properties.

Select Linker, then Manifest File. Set UAC Execution Level to the level you want i.e. requireAdministrator.

If you are using an older version of VS, you can add the manifest file to the project properties under Manifest Tool->Input and Output->Additional Manifest Files. Here is a manifest file that we used for compatibility and UAC:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<description>My App</description>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<requestedExecutionLevel level="requireAdministrator" />
</requestedPrivileges>
</security>
</trustInfo>
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<!--The ID below indicates application support for Windows Vista -->
<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
<!--The ID below indicates application support for Windows 7 -->
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
<!--The ID below indicates app support for Windows 8 -->
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
</application>
</compatibility>
</assembly>
 hokkyokusei 28 Nov 2013
In reply to Chris the Tall:

I know nothing about VC++, but I'm a software developer and when I get stuck I ask here: http://stackoverflow.com/. In fact I hardly ever have to ask, the question has usually already been asked and answered.
In reply to ByEek:

Thanks for the reply - that looks promising. Using Visual Studio 2010. I'd found the stuff in the properties but didn't know what to put in there.

Presumably I simply create a .XML file and put that stuff in ?

Where do those GUIDs come from - are they related to my program or to Windows ?
In reply to hokkyokusei:

Yep, been looking on there, http://www.codeproject.com is another good one

My problem is that I'm so out of touch, being the only VC developer in a very small company, that you sometimes get lost in all the stuff and spend days going round and round in circles
Clauso 28 Nov 2013
In reply to Chris the Tall:

Have you tried rebooting?
In reply to Clauso:

No, but I did try cycling the initialisation process

I got a puncture
Clauso 28 Nov 2013
In reply to Chris the Tall:

... Okay, this sounds serious. I'll cut to the chase and share the rest of my experience.

Is your PC plugged-in to the mains?
Have you emptied the Recycle Bin?
Press Ctrl-Alt-Down Arrow.
Have you checked with the Windows paper-clip for a solution?
Can you recode the whole thing in VB6?
Can you recode the whole thing as an Excel macro?
Can you recode the whole thing in assembly language?
Can you recode the whole thing in XML?
Have you emptied the Recycle Bin?
In reply to Clauso:


> Can you recode the whole thing in VB6?

> Can you recode the whole thing as an Excel macro?

> Can you recode the whole thing in assembly language?

I've got an Excel spreadsheet running VB macros using a C++ Com object to talk to server program written in Algol. Does that answer your question ?
 ByEek 28 Nov 2013
In reply to Chris the Tall:

Yep - just create an XML file and bung it in. The GUIDs should just role off your head! They are the standard GUIDs for each version of Windows. You may have to goole around. I copied that manifest from the one we use but had to cut out some app specific stuff. Alas I am not an expert either but perhaps this is a good place to start. Be aware that Windows XP does not support UAC so will not prompt for access.
Clauso 28 Nov 2013
In reply to Chris the Tall:

> I've got an Excel spreadsheet running VB macros using a C++ Com object to talk to server program written in Algol. Does that answer your question ?

You fool! You've clearly forgotten to plug your 16Kb ZX81 RAM pack in. No wonder you're having problems!?!

... My work here is done.
In reply to ByEek:

Thanks for your help - been a bit busy due to a major sh*tstorm, but now getting "manifest authoring warning 81010002: Unrecognized Element "compatibility" in namespace "urn:schemas-microsoft-com:compatibility.v1"."

Tried installing VS2010 service pack 1 but that doesn't help

Don't suppose it rings any bells ?
 AndyC 28 Nov 2013
In reply to Chris the Tall:


> Don't suppose it rings any bells ?

Actually it does, but mainly to do with trying to use the automated checkout at Sainsburys. Sounds like you are missing the bagging area plugin.
 AndyC 28 Nov 2013
In reply to Chris the Tall:
Best guess - your XML is badly formed, maybe you are missing a closing tag? There shouldn't be an element named 'compatibility' in that namespace.

You could post the XML.
Post edited at 18:46
In reply to AndyC:

I did a cut and paste from the code posted by ByEek, but removing the trustinfo section. I gather compatibility is a newish attribute, which is why I looked for a visual studio update.

As I said I've not been able to play around with it due to unrelated issues

New Topic
This topic has been archived, and won't accept reply postings.
Loading Notifications...