manifest file
-
Hi, How to read a manifest file from executable using either vc++ or sdk? Regards
-
Hi, How to read a manifest file from executable using either vc++ or sdk? Regards
What's a manifest file? Do you mean a .NET assembly manifest? If so, it's XML - you can read it the same way you'd read any XML file. Mark
Mark Salsbery Microsoft MVP - Visual C++ :java:
-
Hi, How to read a manifest file from executable using either vc++ or sdk? Regards
For that you will have to parse the PE (executable file) file yourself. I am not sure if there are functions in WinApi itself for reading PE file. You can get PE file format specification from Microsoft Portable Executable and Common Object File Format Specification[^]. Saurabh
-
What's a manifest file? Do you mean a .NET assembly manifest? If so, it's XML - you can read it the same way you'd read any XML file. Mark
Mark Salsbery Microsoft MVP - Visual C++ :java:
There is manifest file for native applications also. It can either be embedded in the executable file or can be used as standalong file. It basically points to which version of CRT, MFC, and other common controls to use from winsxs. -Saurabh
-
Hi, How to read a manifest file from executable using either vc++ or sdk? Regards
subramanyeswari wrote:
How to read a manifest file from executable using either vc++ or sdk?
Resource digger[^] does it, tell me if that's what you want. I can share with you the function source which does this. Basically manifest file is a resource of type RT_MANIFEST and it's embedded into an exe as such. So what resource digger does is that it loads the exe and searches for
RT_MANIFEST
resource type and get's the content of the resource and saves it to an XML file then opens it with the HTML control.Nibu babu thomas Microsoft MVP for VC++ Code must be written to be read, not by the compiler, but by another human being. Programming Blog: http://nibuthomas.wordpress.com
-
For that you will have to parse the PE (executable file) file yourself. I am not sure if there are functions in WinApi itself for reading PE file. You can get PE file format specification from Microsoft Portable Executable and Common Object File Format Specification[^]. Saurabh
thank you
-
thank you
No problem, you are welcome. -Saurabh
-
subramanyeswari wrote:
How to read a manifest file from executable using either vc++ or sdk?
Resource digger[^] does it, tell me if that's what you want. I can share with you the function source which does this. Basically manifest file is a resource of type RT_MANIFEST and it's embedded into an exe as such. So what resource digger does is that it loads the exe and searches for
RT_MANIFEST
resource type and get's the content of the resource and saves it to an XML file then opens it with the HTML control.Nibu babu thomas Microsoft MVP for VC++ Code must be written to be read, not by the compiler, but by another human being. Programming Blog: http://nibuthomas.wordpress.com
thanks. This is what exactly i am looking for. I opened my exe with your resource digger. I saw my manifest file. How to save it back to xml file. Does it do automatically ?. how to work with resource digger. Is it possible for you to share the source code. And i have one more question. I embed my manifest file in a resouece and linked that resource with exe. I ran that exe in vista. It ran with no UAC prompt. But when i tried to write into registry. It failed to do so. I used requireAdministrator in them anifest. It did not ask for credentials. Should it ask for credentials or not? if it does not ask then i want to enable UAC prompt asking for credentials there. Is it possible to do so programmtically (or) will it work if i do impersonation. Regards
modified on Thursday, July 3, 2008 3:16 AM
-
thanks. This is what exactly i am looking for. I opened my exe with your resource digger. I saw my manifest file. How to save it back to xml file. Does it do automatically ?. how to work with resource digger. Is it possible for you to share the source code. And i have one more question. I embed my manifest file in a resouece and linked that resource with exe. I ran that exe in vista. It ran with no UAC prompt. But when i tried to write into registry. It failed to do so. I used requireAdministrator in them anifest. It did not ask for credentials. Should it ask for credentials or not? if it does not ask then i want to enable UAC prompt asking for credentials there. Is it possible to do so programmtically (or) will it work if i do impersonation. Regards
modified on Thursday, July 3, 2008 3:16 AM
subramanyeswari wrote:
Does it do automatically ?.
Well you've got to write code to get it working. :) So the algorithm is something like this
- Use
FindResourceEx
to find resource of typeRT_MANIFEST
. - Use
LoadResource
to load found manifest resource - Use
LockResource
to get real data in the resource - Save this data to an XML file and this will be your manifest file.
subramanyeswari wrote:
And i have one more question. I embed my manifest file in a resouece and linked that resource with exe. I ran that exe in vista. It ran with no UAC prompt. But when i tried to write into registry. It failed to do so. I used requireAdministrator in them anifest. It did not ask for credentials. Should it ask for credentials or not? if it does not ask then i want to enable UAC prompt asking for credentials there. Is it possible to do so programmtically (or) will it work if i do impersonation.
I am not so familiar with UAC in vista.
Nibu babu thomas Microsoft MVP for VC++ Code must be written to be read, not by the compiler, but by another human being. Programming Blog: http://nibuthomas.wordpress.com
- Use